Search Results

Search found 6108 results on 245 pages for 'entry'.

Page 54/245 | < Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >

  • Obtain all keys of a Neo4j index

    - by MattiSG
    I have a Neo4j database whose content is generated dynamically from a big dataset. All “entry points” nodes are indexed on a named index (IndexManager.forNodes(…)). I can therefore look up a particular “entry point” node. However, I would now like to enumerate all those specific nodes, but I can't know on which key they were indexed. Is there any way to enumerate all keys of a Neo4j Index? If not, what would be the best way to store those keys, a data type that is eminently non-graph-oriented? UPDATE (thanks for asking details :) ): the list would be more than 2 million entries. The main use case would be to never update it after an initialization step, but other use cases might need it, so it has to be somewhat scalable. Also, I would really prefer avoiding killing my current resilience abilities, so storing all keys at once, as opposed to adding them incrementally, would be a last-resort solution.

    Read the article

  • Changing the current count of an Auto Increment value in MySQL?

    - by RD
    Currently every time I add an entry to my database, the auto increment value increments by 1, as it should. However, it is only at a count of 47. So, if I add a new entry, it will be 48, and then another it will be 49 etc. I want to change what the current Auto Increment counter is at. I.e. I want to change it from 47 to say, 10000, so that the next value entered, will be 10001. How do I do that?

    Read the article

  • How does Git know which Index blob to add to a tree?

    - by drozzy
    In Pro Git Ch9 the author says: Git normally creates a tree by taking the state of your staging area or index and writing a tree object from it. My question is how does git know which of two consequitive index entries to create the Tree object from? For example: $ echo 'First change' > one.txt $ git add one.txt $ find .git/objects -type f .git/objects/1f/755a7fffe4 //first index entry $ echo 'Second change' > one.txt $ git add one.txt $ find .git/objects -type f .git/objects/2d/234asdf2 //second index entry $ git commit -a -m "Initial commit" $ git cat-file master^{tree} 100644 blob 2d234asdf2 one.txt //How did it know not to take 1f755?? Does it just look at the blob timestamps? Also - what happens to the first blob created - no one is referencing it. Does it just get destroyed or forgotten?

    Read the article

  • Integrate with Google calendar ?

    - by Karthick
    Hi all.I am using the following code to integrate with google calendar. CalendarService myService = new CalendarService("CalService"); myService.setUserCredentials("[email protected]", "xxxxxxx"); URL feedUrl = new URL("https://www.google.com/calendar/feeds/default/private/"); CalendarFeed resultFeed = myService.getFeed(feedUrl, CalendarFeed.class); System.out.println("Your calendars:"); for (int i = 0; i < resultFeed.getEntries().size(); i++) { CalendarEntry entry = resultFeed.getEntries().get(i); System.out.println("\t" + entry.getTitle().getPlainText()); } But it gives the Exception: Invalid credentials ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2 JDWP exit error AGENT_ERROR_NO_JNI_ENV(183): [../../../src/share/back/util.c:820] Help me to solve this. Can anyone please list the needed jar files to adding calendar events to Google calendar

    Read the article

  • SQL Database application written in Visual Basic in Visual Studio 2010

    - by TID
    Hello, I am writing a program and part of it is to store the keyed entry in a database on an sql server when the enter key is hit. The database is small and simple with only three entry spots in the table. one for the tracking number, one for the date entered, and one for the time entered. The only thing the user will see is the tracking number text box and an enter button. the date and time will be auto entered when the enter key is hit. i am relatively new to databases so i cannot figure out how to send the data to the database. The database is already configured, just need to get the program and the database talking to eachother. Thanks.

    Read the article

  • java.lang.ClassNotFoundException error using enum as a key in Map

    - by LCYSoft
    <util:map id="myMap" key-type="com.myClass.Foo.myEnum" value-type="com.myClass.Foo"> <entry> <key> <value type="com.myClass.Foo.myEnum">ONE</value> </key> <ref bean="myObj"/> </entry> </util:map> package com.myClass public class Foo { public enum myEnum {ONE, TWO;} } I am trying to create a map from Spriong 2.5. Map<myEnum, Foo> myMap; I am getting nested exception is java.lang.ClassNotFoundException:com.myClass.Foo.myEnum I definitely have com.myClass.Foo.myEnumin com.myClass.Foo I don't know why I am getting java.lang.ClassNotFoundException Thanks in advance

    Read the article

  • how to find out if a shape is passable

    - by jd
    I have a complex polygon (possibly concave) and a few of its edges marked as entry/exit points. there is a possibility that inside this polygon may lie one or more blockades of arbitrary shape. what approaches could I use to determine whether a path of certain width exists between a pair of entry/exit edges? having read through the question it looks like a homework type - it is not. I just wish to have a at least a few leads I could pursue, as this is new to me.

    Read the article

  • Perl - Reading .txt files line-by-line and using compare function (printing non-matches only once)

    - by Kurt W
    I am really struggling and have spent about two full days on this banging my head against receiving the same result every time I run this perl script. I have a Perl script that connects to a vendor tool and stores data for ~26 different elements within @data. There is a foreach loop for @data that breaks the 26 elements into $e-{'element1'), $e-{'element2'), $e-{'element3'), $e-{'element4'), etc. etc. etc. I am also reading from the .txt files within a directory (line-by-line) and comparing the server names that exist within the text files with what exists in $e-{'element4'}. The Problem: Matches are working perfectly and only printing one line for each of the 26 elements when there is a match, however non-matches are producing one line for every entry within the .txt files (37 in all). So if there are 100 entries (each entry having 26 elements) stored within @data, then there are 100 x 37 entries being printed. So for every non-match in the: if ($e-{'element4'} eq '6' && $_ =~ /$e-{element7}/i) statement below, I am receiving a print out saying that there is not a match. 37 entries for the same identical 26 elements (because there are 37 total entries in all of the .txt files). The Goal: I need to print out only 1 line for each unique entry (a unique entry being $e-{element1} thru $e-{element26}). It is already printing one 1 line for matches, but it is printing out 37 entries when there is not a match. I need to treat matches and non-matches differently. Code: foreach my $e (@data) { # Open the .txt files stored within $basePath and use for comparison: opendir(DIRC, $basePath . "/") || die ("cannot open directory"); my @files=(readdir(DIRC)); my @MPG_assets = grep(/(.*?).txt/, @files); # Loop through each system name found and compare it with the data in SC for a match: foreach(@MPG_assets) { $filename = $_; open (MPGFILES, $basePath . "/" . $filename) || die "canot open the file"; while(<MPGFILES>) { if ($e->{'element4'} eq '6' && $_ =~ /$e->{'element7'}/i) { ## THIS SECTION WORKS PERFECTLY AND ONLY PRINTS MATCHES WHERE $_ ## (which contains the servernames (1 per line) in the .txt files) ## EQUALS $e->{'element7'}. print $e->{'element1'} . "\n"; print $e->{'element2'} . "\n"; print $e->{'element3'} . "\n"; print $e->{'element4'} . "\n"; print $e->{'element5'} . "\n"; # ... print $e->{'element26'} . "\n"; } else { ## **THIS SECTION DOES NOT WORK**. FOR EVERY NON-MATCH, THERE IS A ## LINE PRINTED WITH 26 IDENTICAL ELEMENTS BECAUSE ITS LOOPING THRU ## THE 37 LINES IN THE *.TXT FILES. print $e->{'element1'} . "\n"; print $e->{'element2'} . "\n"; print $e->{'element3'} . "\n"; print $e->{'element4'} . "\n"; print $e->{'element5'} . "\n"; # ... print $e->{'element26'} . "\n"; } # End of 'if ($e->{'element4'} eq..' statement } # End of while loop } # End of 'foreach(@MPG_assets)' } # End of 'foreach my $e (@data)' I think I need something to identical unique elements and define what fields make up a unique element but honestly I have tried everything I know. If you would be so kind to provide actual code fixes, that would be wonderful because I am headed to production with this script quite soon. Also. I am looking for code (ideally) that is very human-readable because I will need to document it so others can understand. Please let me know if you need additional information.

    Read the article

  • Android/ORMLite Insert Row with ID

    - by Joe M
    I'm currently using ORMLite to work with a SQLite database on Android. As part of this I am downloading a bunch of data from a backend server and I'd like to have this data added to the SQLite database in the exact same format it is on the backend server (ie the IDs are the same, etc). So, my question to you is if I populate my database entry object (we'll call it Equipment), including Equipment's generatedId/primary key field via setId(), and I then run a DAO.create() with that Equipment entry will that ID be saved correctly? I tried it this way and it seems to me that this was not the case. If that is the case I will try again and look for other problems, but with the first few passes over the code I was not able to find one. So essentially, if I call DAO.create() on a database object with an ID set will that ID be sent to the database and if it is not, how can I insert a row with a primary key value already filled out? Thanks!

    Read the article

  • log file not generated while accessing a jar having log4j support.

    - by naveen garimella
    I have a x.jar which is being used by some client y.jar. Both x.jar and y.jar are at the same package level. i have put the log4j.xml at the same package level. But the log file is never generated. Can i know why? I have tried few other options as well but no luck till now. i have added log4j-1.2.16.jar to ClassPath: variable in manifest files of both x.jar and y.jar. Put log4j.xml at the class level of y.jar which actually calls the x.jar classes. package structure is as follows: x.jar --manifest.mf has a entry ClassPath:log4j-1.2.16.jar y.jar --manifest.mf has a entry ClassPath:log4j-1.2.16.jar log4j-1.2.16.jar log4j.xml --has a RollingFileAppender. Can any one suggest whether i am missing anything?

    Read the article

  • Function for getting localized path?

    - by MartinStettner
    Windows 7 (and probably Windows Vista) display localized folder names using the LocalizedResourceName entry in the desktop.ini file. For my Documents folder, this looks like [.ShellClassInfo] LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770 IconResource=%SystemRoot%\system32\imageres.dll,-112 IconFile=%SystemRoot%\system32\shell32.dll IconIndex=-235 (see this question) This way the explorer displays the path "C:\Users\Username\Documents" as "C:\Benutzer\Username\Dokumente" on a german Windows. I wonder, if there's any build-in shell function to automatically get this localized name or, even better, transform a whole path into its localized form (best would be anything in .NET)? This is even more interesting as the LocalizedResourceName entry is only documented for Windows CE (see here). Thanks Martin

    Read the article

  • How to integrate with google Calendar?

    - by Sumithran
    Hi all. I am new to java. I need to integrate with google calendar form my java allpication.But it gives the Exception message : Error connecting with login URI.I use the following code for connect with google. CalendarService myService = new CalendarService("CalendarService"); myService.setUserCredentials("[email protected]", "Kdfdfderekra"); URL feedUrl = new URL("http://www.google.com/calendar/feeds/default/allcalendars/full"); CalendarFeed resultFeed = myService.getFeed(feedUrl, CalendarFeed.class); System.out.println("Your calendars:"); for (int i = 0; i < resultFeed.getEntries().size(); i++) { CalendarEntry entry = resultFeed.getEntries().get(i); System.out.println("\t" + entry.getTitle().getPlainText()); }

    Read the article

  • Return value in Visual Studio's Autos window

    - by Dave
    When I used to develop in C++, I remember that Visual Studio had an entry in its Autos window whenever returning from a function call. This entry would tell me what value was returned from that function. One might argue that if a function returns a value, then you should set a variable to that value, i.e. int i = GetRandomInt(); But as a contrived example, suppose I wanted to do this: CycleTushKicker( GetRandomInt()); Instead of stepping into CycleTushKicker to figure out how many lickings my kid gets, I'd just like to know the value as soon as I exit GetRandomInt. Is there a way to get this when using C#?

    Read the article

  • How to mimic an excel spreadsheet on a website in vb.net?

    - by user1439659
    I am building a website to capture data. I have many spreadsheets that are used for data entry or capture. Now I want to mimic these complex spreadsheets on the web forms but I am unsure of the correct control to use. Data entry must be allowed and live calculations also need to be made similar to formulas on normal excel spreadsheets. Later on the data must be captured into an SQL table. What would be the best control to use or method to mimic that functionality, albeit that the spreadsheet component is no longer available in visual studio 2010. Is it a data grid? Thanks

    Read the article

  • Check if exists, if so, update by 1++, if not insert

    - by Scarface
    Hey guys quick question, I currently have an insert statement $query= "INSERT into new_mail VALUES ('$to1', '0')"; where fields are username, and message_number Currently what I would do to check if the entry exists, is do a select query then check the number of rows with mysql_num_rows (php). If rows==1 then I get the current message_number and set it equal to $row['message_number']++1. Then I update that entry with another query. Is there an easier way to do all this in just mysql with just one query (check if exists, if not insert, if so update message_number, increase by 1)?

    Read the article

  • Select where a value present

    - by Roy
    First a database example: id, product_id, cat, name, value -------------------------------- 1,1,Algemeen,Processor,2 Ghz 2,1,Algemeen,Geheugen,4 GB 3,2,Algemeen,Processor,3 Ghz 4,2,Algemeen,Geheugen,4 GB 5,3,Beeldscherm,Inch,22" 6,3,Beeldscherm,Kleur,Zwart 7,3,Algemeen,Geheugen,3 GB 8,3,Algemeen,Processor,3 Ghz I want with one query to select the follow id's: 1,2,3,4,7,8 Because the cat = algemeen and the name = processor by these products. ID 5,6 are only present by product 3. So, the entry's (cat and name) which are present by all products (product_id) have to be selected. The database contains 80.000 entry's with a lot of diffrent cat's, name's and value's. Is this possible with one query or is some php necessary? How do I do this? My apologies for the bad English.

    Read the article

  • Searching in a TreeMap (Java)

    - by Kronen
    I need to do a search in a map of maps and return the keys this element belong. I think this implementation is very slow, can you help me to optimize it?. I need to use TreeSet and I can't use contains because they use compareTo, and equals/compareTo pair are implemented in an incompatible way and I can't change that. (sorry my bad english) Map m = new TreeSet(); public String getKeys(Element element) { for(Entry e : m.entrySet()) { mapSubKey = e.getValue(); for(Entry e2 : mapSubKey.entrySet()) { setElements = e2.getValue(); for(Element elem : setElements) if(elem.equals(element)) return "Key: " + e.getKey() + " SubKey: " + e2.getKey(); } } }

    Read the article

  • What was your first home computer?

    - by Adam Tegen
    What was your first home computer? The one that made you "fall in love" with programming. There are 300+ entries, many (most?) of which are duplicates. As with all StackOverflow Poll type Q&As, please make certain your answer is NOT listed already before adding a new answer - searching doesn't always find it (model naming variations, I assume). If it already exists, vote that one up so we see what the most popular answer is, rather than duplicating an existing entry. If you see a duplicate, vote it down so the top entries have only one of each model listed. If you have interesting or additional information to add, use a comment or edit the original entry rather than creating a duplicate.

    Read the article

  • select field information with min time value

    - by Scarface
    Hey guys quick question, I thought I was doing the right thing but I keep getting the wrong result. I am trying to simply find the id of the entry with the min time, but I am not getting that entry. $qryuserscount1="SELECT id,min(entry_time) FROM scrusersonline WHERE topic_id='$topic_id'"; $userscount1=mysql_query($qryuserscount1); while ($row2 = mysql_fetch_assoc($userscount1)) { echo $onlineuser= $row2['id']; } That is my query, and it does not work. This however does work which does not make sense to me SELECT id FROM scrusersonline WHERE topic_id='$topic_id' ORDER by entry_time LIMIT 1, can anyone quickly point out what I am doing wrong?

    Read the article

  • How to update mutual entries in DB?

    - by Sthita
    I am not able to perform mutual update to my Database. My Requirement is like this : Insert IDS UPDate DB Entries ID ConnectedTo ID connectedTo connectedVia 2 1 --- No Entry ----- 2 3 -- No Entry ----- When ID 1 Comes in to picture (Enties happened to Table) 1 4 1 3 2 1 5 2 4 1 1 2 2 5 1 When ID 3 Comes into picture (Enties happened to Table) 3 4 3 5 1 3 1 ---- 3 2 ---- Similarly when ID 4 Comes in to picture 4 9 4 2 3 4 10 4 5 1 4 3 4 2 1 4 1 1 9 4 1 10 4 Its basically Updating the mutual connections.No Duplicate entries should happen. Like for example 2 3 and 3 2 are mutually connected and 1 is associated with them so there is no need to insert (3 2 via 1). I think this is my requirement. Anything possible combinations i have missed please let me know. i will Update. Please help me writing the logic or any example using jdbc and java.

    Read the article

  • Create tables for a dictionary?

    - by heffaklump
    I'm making a dictionary database in SQLite and need some tips. My SQL is a bit rusty ;) Would you consider this good SQL? It's done with Java JDBC. This is for creating the tables. CREATE TABLE word ( id INTEGER, entry STRING, pos STRING ); CREATE TABLE translation ( word_id INTEGER REFERENCES word(id), entry STRING ); And when filling with data i give each word a number (id) and that words translations get the same number as word_id. What would be the best way of pulling out translations for a specific word?

    Read the article

  • Customs toString in Java not giving desired output and throwing error

    - by user2972048
    I am writing a program in Java to accept and validate dates according to the Gregorian Calendar. My public boolean setDate(String aDate) function for an incorrect entry is suppose to change the boolean goodDate variable to false. That variable is suppose tell the toString function, when called, to output "Invalid Entry" but it does not. My public boolean setDate(int d, int m, int y) function works fine though. I've only included the problem parts as its a long piece of code. Thanks public boolean setDate(int day, int month, int year){ // If 1 <= day <= 31, 1 <= month <= 12, and 0 <= year <= 9999 & the day match with the month // then set object to this date and return true // Otherwise,return false (and do nothing) boolean correct = isTrueDate(day, month, year); if(correct){ this.day = day; this.month = month; this.year = year; return true; }else{ goodDate = false; return false; } //return false; } public boolean setDate(String aDate){ // If aDate is of the form "dd/mm/yyyy" or "d/mm/yyyy" // Then set the object to this date and return true. // Otherwise, return false (and do nothing) Date d = new Date(aDate); boolean correct = isTrueDate(d.day, d.month, d.year); if(correct){ this.day = d.day; this.month = d.month; this.year = d.year; return true; }else{ goodDate = false; return false; } } public String toString(){ // outputs a String of the form "dd/mm/yyyy" // where dd must be 2 digits (with leading zero if needed) // mm must be 2 digits (with leading zero if needed) // yyyy must be 4 digits (with leading zeros if needed) String day1; String month1; String year1; if(day<10){ day1 = "0" + Integer.toString(this.day); } else{ day1 = Integer.toString(this.day); } if(month<10){ month1 = "0" + Integer.toString(this.month); } else{ month1 = Integer.toString(this.month); } if(year<10){ year1 = "00" + Integer.toString(this.year); } else{ year1 = Integer.toString(this.year); } if(goodDate){ return day1 +"/" +month1 +"/" + year1; }else{ goodDate = true; return "Invalid Entry"; } } Thank you

    Read the article

  • Poll: What is stopping you from switching (from Java) to Scala ?

    - by Lukasz Lew
    What would make you to switch to Scala ? If you are negative on the switching to Scala, please state the reason as well (or upvote). As with all StackOverflow Poll type Q&As, please make certain your answer is NOT listed already before adding a new answer If it already exists, vote that one up so we see what the most popular answer is, rather than duplicating an existing entry. If you see a duplicate, vote it down. If you have interesting or additional information to add, use a comment or edit the original entry rather than creating a duplicate.

    Read the article

  • Using sed with html data

    - by StackedCrooked
    I'm having some problems using sed in combination with html. The following sample illustrates the problem: HTML="<html><body>ENTRY</body><html>" TABLE="<table></table>" echo $HTML | sed -e s/ENTRY/$TABLE/ This outputs: sed: -e expression #1, char 18: unknown option to `s' If I leave out the / from $TABLE so that it becomes <table><table> it works ok. Any ideas on how to fix it?

    Read the article

  • Problem decrementing in Java with '-='

    - by hanesjw
    I'm making a scrolling game on Android and am having a hard time figuring out why the code below does not decrement past 0. Objects start at the end of the screen (so the x position is equal to the width of the screen) the objects move accross the screen by decrementing their x positions. I want them to scroll off of the screen, but when the x position hits 0, the objects just stay at 0, they do not move into the negatives. Here is my code to move objects on the screen private void incrementPositions(long delta) { float incrementor = (delta / 1000F) * Globals.MAP_SECTION_SPEED; for(Map.Entry<Integer, HashMap<Integer, MapSection>> column : scrollingMap.entrySet()) { for(Map.Entry<Integer, MapSection> row : column.getValue().entrySet()) { MapSection section = row.getValue(); section.x -= incrementor; } } } It works ok if I change section.x -= incrementor; to section.x = section.x - (int)incrementor; but if i do that the scrolling doesn't appear as smooth.

    Read the article

< Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >