Vote count: 0 I have data that requires two types of access: a unique identifier to retrieve a single row the retrieval of a batch of rows by a field equalling False The main table can contain many fields (e.g., 100). In DynamoDB I have a schema defining a primary key and a Global Secondary Index defining a field of KeyType Number which I set to 0 or 1. The table itself contains many fields so this set-up is expensive. i.e. many fields are copied to the Global Secondary Index when the main table changes. Can it be better to store the primary key of the main table in the Global Secondary Index and then perform individual looks-up from the rows retued by a Global Secondary Index Query? asked 2...
ادامه مطلبVote count: 0 I am building a XML reader to read xml file and insert it into SQL using php the XML tag look like this Adam I can acess the information inside it using this $thePostIdArray[0] This is not working 100% because some time the order of the XML tags are changed. I want to access this using code like this $thePostIdArray[name] any Ideas ? asked 1 min agoMarvos Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Take input from user in an array in form of numeric and show histogram Where i'm wrong The code is given in java the user can enter 5 input in number and histogram should show in any form with no constraints package p21; import java.util.Scaer; public class P21 { public static void main(String[] args) { { int count[]=new int[10]; // count array will keep elements of element // in particular range; int elements[]; // for example 27 15 34 22 11 11 19 { // in above input there is count[0]=0; for(int i=0;i=0 && elements[i]...
ادامه مطلبVote count: 0 I have class like "location". "Location" class have four field. fields are:id,city,state,country.. country is seprate class it contains 2 field , country code, country name , 2 fields must read from location class.. if i write "locationMongoRepository.save()", then it shows error as bound mismatch. please give solution for how to save in mongodb. public void insertLocation() throws InvalidFormatException, IOException, JSONException{ FileInputStream inp; Workbook workbook; try { inp = new FileInputStream( "/home/Downloads/eclipse/Workspace/Samplboot-master latest/cityListForIndia1.xlsx" ); workbook = WorkbookFactory.create( inp ); Sheet sheet = workbook.getSheetAt(0); JSONArray ...
ادامه مطلبVote count: 0 I created a Memory store (model) based on a simple Json Schema like this and tried to put an an invalid value, however the object was still created inside the store. require( [ 'dojo/_base/declare', 'dstore/Memory', 'dmodel/extensions/jsonSchema' ], function (declare, Memory, jsonSchema) { var myStore = new Memory({ model: jsonSchema({ properties: { someProperty: { type: "number", minimum: 0, maximum: 10 }, } }) }); myStore.put({ id: 1, someProperty: -21 }); }); Next I tried to use the String Validator like this require( [ 'dojo/_base/declare', 'dstore/Memory', 'dmodel/extensions/jsonSchema', 'dmodel/validators/StringValidator' ], function (declare, Memory, jsonSchema, StringVa...
ادامه مطلبVote count: -1 Given an image, say a colored 500x500 px 72dpi, with visible watermarks in it. I want to detect if the image contains some watermark or not. As a follow up I would like to remove that too. I am quite new to Image Processing and would like to know what all methods/techniques exists in recognizing watermarks in an image. There was not much that I could find related to this on Stack Overflow also. There was just this link Removing watermark out of an image in opencv, but it is not a generic approach. Any guidance is much appreciated. I have attached a sample pic, from google search. We could see the watermark "Preview" in the image. Any possible approaches to detect it? asked 1 m...
ادامه مطلبVote count: 0 I've got Regex targeting alpha-numeric strings that are product numbers (all will be CAP/number combinations of various lengths) wrapping these product numbers in bold tags for hundreds of generated HTML emails. This worked great to bold product numbers, but also captures random parts of URLs and hex colors in my HTML email's tags attributes. I've tried to exclude hex colors, and only include text after ">" and before "...
ادامه مطلبVote count: 0 I'm unable to find an answer to this, or I'm not looking in the right place, but I'm trying to find a way where I can group a number of elements (panels) inside one large panel using both AngularJS and Bootstrap. So for example, I have around 60 or so mini panels that represent customer contact forms. All of these forms sit inside one large panel with an ng-repeat. I am wanting to somehow group my contacts by different criteria (e.g By State code or by Company Type, etc.) from a dropdown control. I would like all contacts to be shown in the one panel but segregated by a .page-header (a similar setup to the example below): Has anyone seen any examples of this anywhere, or have a...
ادامه مطلبVote count: 0 I wont start service at specific time everyday and also start when the device boot complete. For example.. at 13.00 Pm everyday the service started and show a Toast ("Service started"). not only that, but the service has to start also at boot complete but if you are not the 13.00 pm should not show the toast but must started Sorry for my english =) asked 23 secs agoEdoardo Goffredo Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Using rajawali library. I am using a sphere to show a 360 photo, with sphere's scaleX set to -1 and camera's position to Vector3.ZERO, I am able to see the 360 photo from the inside. With ArcballCamera to replace the default camera, I can use touch gesture to see all the 360 degrees. The problem is that after touching and moving, the scene will be upside down. How to prevent this? How to enable the gimbal lock feature in rajawali. asked 1 min agoWesley Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am trying to use HTMLUnitDriver in my selenium test to understand how HTMLUnitDriver works. Kindly help me with resolving the issue. I have added the below jars to the build path in eclipse selenium-java-2.53.0 jars TestNG jar Added the below jars as these were mentioned in other posts as a solution to the error I encountered. However, the issue remains. selenium-htmlunit-driver-2.52.0 jar selenium-server-standalone-2.53.0 Hi, I am trying to use HTMLUnitDriver in my selenium test to understand how HTMLUnitDriver works. Kindly help me with resolving the issue. I have added the below jars to the build path in eclipse selenium-java-2.53.0 jars TestNG jar Added the below jars as ...
ادامه مطلبVote count: 0 I'm using this approach to keep my string constants together. Using the same example from that post: MONExtResult.h struct MONExtResultStruct { __unsafe_unretained NSString * const AppID; __unsafe_unretained NSString * const ErrorCode; __unsafe_unretained NSString * const Progress; }; exte const struct MONExtResultStruct MONExtResult; MONExtResult.m const struct MONExtResultStruct MONExtResult = { .AppID = @"appid", .ErrorCode = @"errorcode", .Progress = @"progress" }; When I try to use it in Swift: let appID: String = MONExtResult.AppID I get the error: Caot convert value of type 'Unmanaged!' to expected argument type 'String' This is because I need to grab the value from the ...
ادامه مطلبVote count: 0 One of the features in the app I am developing is ability to see who in your phonebook is using app. Usually this requires uploading the list of contacts, checking against numbers registered in service, then showing them in table view. To do the upload part and checking, I am not sure how to do this since I am using Kinvey Mbaas. Any advice is appreciated. Thanks, asked 16 secs agoksa_coder Let's block ads! بخوانید...
ادامه مطلبVote count: -1 I am new to python and I have to design a Python API(version - 2.7) similar to an existing Java API Python version - 2.7 The Java API is as follows There is a Process interface public interface Process { Future create(Client client) } There are two implementations of Process . For simplicity I have shown the implementation of one 1) FirstProcess2) SecondProcess public class FirstProcess implements Process { Future create(Client client) { } } There is a ProcessFactory public interface ProcessFactory { Process createProcess() } There are two implementations of ProcessFactory1) FirstProcessFactory2) SecondProcessFactory For simplicity I have just shown the implementation of one p...
ادامه مطلبVote count: 0 I'm writing a C++ desktop application with An embedded webview to show the UI written in html/css/js. A C++ backend to handle all logic and core operations. In order to show the web UI in the embedded webview without problems, I need to server those files from a local directory that will be part of the application. So I need to embed an http server as part of the application as well. So I'm looking to do something like this: web_view.ShowUrl("localhost:8080"); And this should automatically open index.html in /path/to/my/ui/directory/ that the embedded http server is set up to serve. Then it should be able to handle any includes of other scripts, html/css files, resource files l...
ادامه مطلبVote count: 0 I have this form , i perosonal details will be inserted into personal table then book details into book table. book details has 1 original and 4 cloned rows. i want to insert all them at once into database. Earlier i had used php mysqli_real_escape_string which was working perfectly with bootstrap 3. but same is not working with materialize css. giving error Waing: Invalid argument supplied for foreach(). here is my code, $mysqli = new mysqli($host,$user,$password,$database); $users_firstname = $_POST['firstname']; $users_middlename = $_POST['middlename']; $users_lastname = $_POST['lastname']; $users_gender= $_POST['gender']; $users_location= $_POST['location']; $users_email= $...
ادامه مطلبVote count: 0 I am making a simple game that involves users pressing unbuttons. Each time the user presses a button I want a sound to play. The sound file that I want to play is 3 seconds long. However it is highly likely that the user will press 1 or more uibuttons onscreen within the 3 second window that the sound is playing. So at the moment if a second UIButton is press while the sound is playing than the sound will not play. How can I have it so that the buttons play the sound even if the the original sound is playing? import UIKit import AVFoundation class ViewController: UIViewController { var player:AVAudioPlayer = AVAudioPlayer() override func viewDidLoad() { super.viewDidLoad() let...
ادامه مطلبVote count: 0 I have a page in which I am pushing some javascript using google tag manager. The javascript code has a function which executes on DOM ready and modifies certain elements on the page if it is being accessed from a mobile device. The code works fine when the page directly open in the browser but if we move out from the page by clicking a link and come back again by using the browser back button the page does not get modified that is either the code from the tag manager is not getting push into the page or somehow the code is not executed. asked 41 secs agodevkaustav Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Write a program that finds the number of vowels (‘a’, ‘e’, ‘o’, ‘i’, ‘u’) in a command line argument list. Use a separate thread to do the count for each command line argument. Thus if you have 5 command line arguments, you should spawn 5 threads. Once all threads have finished their work, you should print the total number of vowels found. Example program runs: java VowelCounter Hello Hello see you in Italy in Venice Number of vowels: 15 Once you have the above working, add an additional complication. Let’s imagine that we will be reading the words in from a file and there will be many words. Modify your program so that we will store the result for each word that is processed. ...
ادامه مطلبVote count: 0 I am leaing to create a bot using Microsoft Bot Framework. I am a newbie in C# programming. In the following code, I have tried to create a conversational bot. Here, initially the user enters a query, it passed to LUIS api to understand the response. The specific values are stored in variables x and y. If x and y are particular values, then the user is requested to input the values again as shown. As shown in the code, I am using PostAsync method to post to the bot and awaiting response from the user using context.wait(MessageReceivedAsync). But when my execution goes into if(x==0),it dows not post the message to the user at that instant and also does not wait for the input fro...
ادامه مطلب