Search Results

Search found 634 results on 26 pages for 'orange peel'.

Page 4/26 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Parse.com REST API in Java (NOT Android)

    - by Orange Peel
    I am trying to use the Parse.com REST API in Java. I have gone through the 4 solutions given here https://parse.com/docs/api_libraries and have selected Parse4J. After importing the source into Netbeans, along with importing the following libraries: org.slf4j:slf4j-api:jar:1.6.1 org.apache.httpcomponents:httpclient:jar:4.3.2 org.apache.httpcomponents:httpcore:jar:4.3.1 org.json:json:jar:20131018 commons-codec:commons-codec:jar:1.9 junit:junit:jar:4.11 ch.qos.logback:logback-classic:jar:0.9.28 ch.qos.logback:logback-core:jar:0.9.28 I ran the example code from https://github.com/thiagolocatelli/parse4j Parse.initialize(APP_ID, APP_REST_API_ID); // I replaced these with mine ParseObject gameScore = new ParseObject("GameScore"); gameScore.put("score", 1337); gameScore.put("playerName", "Sean Plott"); gameScore.put("cheatMode", false); gameScore.save(); And I got that it was missing org.apache.commons.logging, so I downloaded that and imported it. Then I ran the code again and got Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V at org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:120) at org.apache.http.client.protocol.RequestAddCookies.process(RequestAddCookies.java:122) at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:131) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:193) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:85) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57) at org.parse4j.command.ParseCommand.perform(ParseCommand.java:44) at org.parse4j.ParseObject.save(ParseObject.java:450) I could probably fix this with another import, but I suppose then something else would pop up. I tried the other libraries with similar results, missing a bunch of libraries. Has anyone actually used REST API successfully in Java? If so, I would be grateful if you shared which library/s you used and anything else required to get it going successfully. I am using Netbeans. Thanks.

    Read the article

  • Inspecting Lucene.NET index with Luke want to replicate NHibernate.Search view

    - by Tim Peel
    Hi, I am trying to put together an index using terms, which I specify as a comma separated list. I want to replicate the display in Luke as seen here: http://ayende.com/Blog/archive/2009/05/03/nhibernate-search-again.aspx But my index value just shows as a single field with the comma separate list value. For example: Tags term,anotherterm When I search my index, it will return results if I search with "term" but will not return anything if I search with "anotherterm" I thought the indexing process would break the comma separate list apart into separate values but this does not seem to be the case. Anyone got any ideas? Thanks

    Read the article

  • Lucene.NET search index approach

    - by Tim Peel
    Hi, I am trying to put together a test case for using Lucene.NET on one of our websites. I'd like to do the following: Index in a single unique id. Index across a comma delimitered string of terms or tags. For example. Item 1: Id = 1 Tags = Something,Separated-Term I will then be structuring the search so I can look for documents against tag i.e. tags:something OR tags:separate-term I need to maintain the exact term value in order to search against it. I have something running, and the search query is being parsed as expected, but I am not seeing any results. Here's some code. My parser (_luceneAnalyzer is passed into my indexing service): var parser = new QueryParser(Lucene.Net.Util.Version.LUCENE_CURRENT, "Tags", _luceneAnalyzer); parser.SetDefaultOperator(QueryParser.Operator.AND); return parser; My Lucene.NET document creation: var doc = new Document(); var id = new Field( "Id", NumericUtils.IntToPrefixCoded(indexObject.id), Field.Store.YES, Field.Index.NOT_ANALYZED, Field.TermVector.NO); var tags = new Field( "Tags", string.Join(",", indexObject.Tags.ToArray()), Field.Store.NO, Field.Index.ANALYZED, Field.TermVector.YES); doc.Add(id); doc.Add(tags); return doc; My search: var parser = BuildQueryParser(); var query = parser.Parse(searchQuery); var searcher = Searcher; TopDocs hits = searcher.Search(query, null, max); IList<SearchResult> result = new List<SearchResult>(); float scoreNorm = 1.0f / hits.GetMaxScore(); for (int i = 0; i < hits.scoreDocs.Length; i++) { float score = hits.scoreDocs[i].score * scoreNorm; result.Add(CreateSearchResult(searcher.Doc(hits.scoreDocs[i].doc), score)); } return result; I have two documents in my index, one with the tag "Something" and one with the tags "Something" and "Separated-Term". It's important for the - to remain in the terms as I want an exact match on the full value. When I search with "tags:Something" I do not get any results. Question What Analyzer should I be using to achieve the search index I am after? Are there any pointers for putting together a search such as this? Why is my current search not returning any results? Many thanks

    Read the article

  • MS Source Server - source stream is apparently not there when viewing with srctool

    - by Tim Peel
    Hi, I have been playing around with the MS Source Server stuff in the MS Debugging Tools install. At present, I am running my code/pdbs through the Subversion indexing command, which is now running as expected. It creates the stream for a given pdb file and writes it to the pdb file. However when I use that DLL and associated pdb in visual studio 2008, it says the source code cannot be retrieved. If I check the pdb against srctool is says none of the source files contained are indexed, which is very strange as the process prior ran fine. If I check the stream that was generated from the svnindex.cmd run for the pdb, srctool says all source files are indexed. Why would there be a difference? I have opened the pdb file in a text editor and I can see the original references to the source files on my machine (also under the srcsrv header name) and the new "injected" source server links to my subversion repository). Should both references still exist in the pdb? I would have expected one to be removed? Either way, visual studio 2008 will not pick up my source references so I am a bit lost as to what to try next. As far as I can tell, I have done everything I should have. Anyone have similar experiences? Many thanks.

    Read the article

  • Windows batch - loop over folder string and parse out last folder name

    - by Tim Peel
    Hi, I need to grab the folder name of a currently executing batch file. I have been trying to loop over the current directory using the following syntax (which is wrong at present): set mydir = %~p0 for /F "delims=\" %i IN (%mydir%) DO @echo %i Couple of issues in that I cannot seem to pass the 'mydir' variable value in as the search string. It only seems to work if I pass in commands; I have the syntax wrong and cannot work out why. My thinking was to loop over the folder string with a '\' delimiter but this is causing problems too. If I set a variable on each loop then the last value set will be the current folder name. For example, given the following path: C:\Folder1\Folder2\Folder3\Archive.bat I would expect to parse out the value 'Folder3'. I need to parse that value out as its name will be part of another folder I am going to create further down in the batch file. Many thanks if anyone can help. I may be barking up the wrong tree completely so any other approaches would be greatly received also. Tim

    Read the article

  • Use a named custom column in SQL 2005 in WHERE clause?

    - by Orange Kid
    Can I name a custom column in the SELECT statement and reference that in the WHERE clause without duplicating code? For example; SELECT RIGHT(REPLICATE('0', 5) + RTRIM(SOME_ID)), 5) AS DISPLAY_ID FROM dbo.MY_TABLE WHERE DISPLAY_ID LIKE '%005%' Only much more complicated. I want to maintain this code in one place only but SQL Server 2005 forces me to duplicate the custom SELECT in the WHERE clause. I believe this was possible in Microsoft SQL Server 2000 but no longer in 2005. Thanks.

    Read the article

  • Blockquote border on tumblr theme

    - by orange
    This is the code for the link block: {block:Link} <div class="post link"> <h2> <a href="{URL}" class="name">{Name}</a></h2> <div class="content"> {block:Description}{Description}{/block:Description} <span class="date"> <a href="{Permalink}">{ShortMonth} {DayOfMonth}, {Year} </a> </span> </div> </div> {/block:Link} What I'm trying to do is add a border-left of of 10px to block quotes. When I try to add this style to block quotes this happens: The block quote border flows into the post title and I don't wish for this to happen, I want the border layout to stay within the content div. I'm using this CSS at the moment: div div div blockquote { border-left: 10px solid red; } Thanks in advance for the help! Just to clarify <div class="post link"> is in another div. Here is the tumblr: http://iamsomething-awesome.tumblr.com/

    Read the article

  • Reloading an external element (via jQuery's .load) without impact on same-named host elements on sam

    - by Martin Pescador
    Hello together! [First, I'm an absolute beginner. I tried to express myself as good as I could - please correct me on any issue... Now: I have the following problem:] I am loading a div element, which class always is ".gallery" from a couple of pages (in this example "the page index.php?page=orange") into another page's div (in this case with the ID "orange") using the following code: $("#orange").load("http://example.com/index.php?page=orange .gallery"); Each div.gallery I load in, is a set of a few images. Between them, you can switch (there are "previous"- and "next"-links in ".imgnavi"). $(".imgnavi a").live("click", function(ev) { ev.preventDefault(); ev.stopPropagation(); $(".gallery").load($(this).attr("href")); return false; }) What happens now: Loading the different div.gallery into the new page is no problem, but as soon as I start to navigate inside those divs (each div is a little gallery, where you can switch between images), the div.gallery I am switching in is suddenly loaded into EVERY other div.gallery in the document! How do I prevent that?

    Read the article

  • Windows Form color changing

    - by Sef
    Hello, So i am attempting to make a MasterMind program as sort of exercise. Field of 40 picture boxes (line of 4, 10 rows) 6 buttons (red, green, orange, yellow, blue, purple) When i press one of these buttons (lets assume the red one) then a picture box turns red. My question is how do i iterate trough all these picture boxes? I can get it to work but only if i write : And this is offcourse no way to write this, would take me countless of lines that contain basicly the same. private void picRood_Click(object sender, EventArgs e) { UpdateDisplay(); pb1.BackColor = System.Drawing.Color.Red; } Press the red button - first picture box turns red Press the blue button - second picture box turns blue Press the orange button - third picture box turns orange And so on... Ive had a previous similar program that simulates a traffic light, there i could assign a value to each color (red 0, orange 1, green 2). Is something similar needed or how exactly do i adress all those picture boxes and make them correspond to the proper button. Best Regards.

    Read the article

  • MySQL LIMIT 1 but query 15 rows?

    - by Ian
    Basically what I'm trying to do is compare the ID's of rows against 15 results in MySQL, eliminating all but 1 (using NOT IN) and then pull that result. Now normally this would be fine by itself, however the order of the 15 rows I'm doing the SQL query for are constantly changing based on a ranking, so there is a possibility that between the time the ranking updates, and the ajax request (which I submit the ID's for NOT IN) more than just one ID has changed, which would of course bring back more than one row which I do not want. So in short, is there a way in which I can query 15 rows, but only return one? Without having to run two separate queries. Any help is appreciated, thank you. EXAMPLE: Say I have 7 items in my database, and I'm displaying 5 on the page to the user. These are what are being displayed to the user: Apple Orange Kiwi Banana Grape But in the database I also have Peach Blackberry Now what I want to do is if the user deletes an item from their list, it will add another item (based on a ranking they have) Now the issue is, in order to know what they have on their list at the moment I send the remaining items to the database (say they deleted Kiwi, I would send Apple, Orange, Banana, and Grape) So now I select the highest ranked 5 items from are remaining six items, make sure they are not the ones already displayed on the page, and then add the new one to list (either Peach or Blackberry) All good and well, except that if both peach and blackberry now outrank grape, then I will be returning two results instead of just one. Because it would've searched... Apple Orange Banana Peach Blackberry and excluded... Apple Orange Banana Grape Which leaves us with both Peach and Blackberry, instead of just Peach or Blackberry

    Read the article

  • Div at bottom of window and adaptable height div

    - by Rob
    Is there a way to get a div to always be at the bottom of the window, and another div to change its height to fill any space that it leaves, and that div will scroll if its content is too long. (I never want the window to scroll). This is best illustrated by a picture: The green div will always put itself at the bottom of the window, and the orange div will fill the gap. When the window is smaller, like in the right hand image, the orange div will be smaller and will scroll. The green div can be toggled. Sometimes the green div will have display: none, and then the orange div will stretch to the bottom. When the green div has display: block again, it will look like the picture again. It has to work in IE6. So far I can get the green div to go to the bottom by: position: absolute; bottom: 0; But I don't know how to get the orange div to do what I want.

    Read the article

  • C# Combining lines

    - by Mike
    Hey everybody, this is what I have going on. I have two text files. Umm lets call one A.txt and B.txt. A.txt is a config file that contains a bunch of folder names, only 1 listing per folder. B.txt is a directory listing that contains folders names and sizes. But B contains a bunch of listing not just 1 entry. What I need is if B, contains A. Take all lines in B that contain A and write it out as A|B|B|B ect.... So example: A.txt: Apple Orange Pear XBSj HEROE B.txt: Apple|3123123 Apple|3434 Orange|99999999 Orange|1234544 Pear|11 Pear|12 XBSJ|43949 XBSJ|43933 Result.txt: Apple|3123123|3434 Orange|99999999|1234544 Pear|11|12 XBSJ|43949|43933 This is what I had but it's not really doing what I needed. string[] combineconfig = File.ReadAllLines(@"C:\a.txt"); foreach (string ccline in combineconfig) { string[] readlines = File.ReadAllLines(@"C:\b.txt"); if (readlines.Contains(ccline)) { foreach (string rdlines in readlines) { string[] pslines = rdlines.Split('|'); File.AppendAllText(@"C:\result.txt", ccline + '|' + pslines[0]); } } I know realize it's not going to find the first "if" because it reads the entire line and cant find it. But i still believe my output file will not contain what I need.

    Read the article

  • Can't change Firefox menu background color using userChrome.css on Windows 7

    - by soupagain
    I can't change Firefox's menu background color using userChrome.css on Windows 7. menubar, menubutton, menulist, menu, menuitem { color: red !important; background-color: orange !important; } This seems to work as the menubar changes to red and orange. But the background-color on the actual drop down menu stays the same (that Windows 7 menu look), although the text color does change to red. Any ideas??

    Read the article

  • convert home phone wiring to Ethernet

    - by aaa
    can i convert phone wiring in walls to act as only Ethernet network cause the phone wiring is not in use and not connected to the phone company so there is no voltage in the wires i remove the wall plate and i find 6 wires blue,blue/white,green,green/white,orange,orange/white , and i know that Ethernet use 8 here is what i am thinking get Ethernet cable cut it in half and attach wires from wall to the first computer and the same with the other computer so if this is possible do i just attach wires in the same color and ignore brown wire or do i have to rearrange wires , and how much the speed will be thank you in advance

    Read the article

  • convert home phone wiring to Ethernet

    - by aaa
    can i convert phone wiring in walls to act as only Ethernet network cause the phone wiring is not in use and not connected to the phone company so there is no voltage in the wires i remove the wall plate and i find 6 wires blue,blue/white,green,green/white,orange,orange/white , and i know that Ethernet use 8 here is what i am thinking get Ethernet cable cut it in half and attach wires from wall to the first computer and the same with the other computer so if this is possible do i just attach wires in the same color and ignore brown wire or do i have to rearrange wires , and how much the speed will be thank you in advance

    Read the article

  • Can't change Firefox menu background color using userChrome.css on Windows 7

    - by soupagain
    I can't change Firefox's menu background color using userChrome.css on Windows 7. menubar, menubutton, menulist, menu, menuitem { color: red !important; background-color: orange !important; } This seems to work as the menubar changes to red and orange. But the background-color on the actual drop down menu stays the same (that Windows 7 menu look), although the text color does change to red. Any ideas??

    Read the article

  • Sort each standalone line alphabetically

    - by Daniel
    I want to sort some items in alphabetic order, but in a very specifc way. I have, for example, the following list, each item separated by comma: monkeys, dogs, cats pineapple, banana, orange yellow, red, blue, green silver, gold, platinum delphi, java, c++, visual basic I want to sort each line alphabetically, WITHOUT changing line order. My desired result would be: cats, dogs, monkeys banana, orange, pineapple blue, green, red, yellow gold, platinum, silver c++, delphi, java, visual basic My target list has got 3000+ lines, so it should be an automated process. Thanks!

    Read the article

  • Change VLC multimedia icons

    - by cipricus
    I want VLC as my universal player. It has a lot of qualities that everybody acknowledges and a few shortcomings which made me use other players in time. But in the end I have to concede it is still the best - especially while used on different platforms. One of the small but annoying short-backs is the ugly and universally known orange cone. I would like to have other icons than the same orange cone for all media files.

    Read the article

  • How to "interleave" two DataTables.

    - by Brent
    Take these two lists: List 1 Red Green Blue List 2 Brown Red Blue Purple Orange I'm looking for a way to combine these lists together to produce: List 3 Brown Red Green Blue Purple Orange I think the basic rules are these: 1) Insert on top the list any row falling before the first common row (e.g., Brown comes before the first common row, Red); 2) Insert items between rows if both lists have two items (e.g., List 1 inserts Green between Red and Blue); and 3) Insert rows on the bottom if the there's no "between-ness" found in 2 (e.g., List 2 inserts Orange at the bottom). The lists are stored in a DataTable. I'm guessing I'll have to switch between them while iterating, but I'm having a hard time figuring out a method of combining the rows. Thanks for any help. --Brent

    Read the article

  • Remove newlines from MarkupBuilder result

    - by aldrin
    Is there a way to control groovy's MarkupBuilder's output and filter out the newline characters? I have code like below: import groovy.xml.MarkupBuilder def writer = new StringWriter() def xml = new MarkupBuilder(writer) xml.basket(){ fruit (type:"apple", 1) fruit (type:"orange", 2) } which invariably outputs: <basket> <fruit type='apple'>1</fruit> <fruit type='orange'>2</fruit> </basket> I'd really like it in a single line: <basket><fruit type='apple'>1</fruit><fruit type='orange'>2</fruit></basket>

    Read the article

  • Constraining enum value in method parameter

    - by fearofawhackplanet
    enum Fruit { Banana, Orange, Strawberry ... ... // etc, very long enum } PeelFruit(Fruit.Orange); PeelFruit(Fruit.Banana); PeelFruit(Fruit.Strawberry); // huh? can't peel strawberries! Sorry for the lame example, but hopefully you get the idea. Is there a way to constrain the enum values that PeelFruit will accept? Obvisouly I could check them in the method with a switch or something, but it would be cool if there was a way to do it that is a) a bit more compact, and b) would cause a compile time error, not a run time error. [Fruit = Orange,Bannana] void PeelFruit(Fruit fruit) { ... }

    Read the article

  • C# pulling out columns from combobox text

    - by Mike
    What i have is four comboboxes and two files. If the column matches the combobox i need to write it out to a file but it has to appened with the second combobox. So for example Combobox1: Apple | Orange Combobox2: Pineapple | Plum I have selected Apple Plum I need to search threw a text file and find whatever columns is Apple or Plum: Orange|Pear|Peach|Turnip|Monkey|Apple|Grape|Plum and then i need to write out just the columns Apple|Plum to a new text file. Any help would be awesome! Better example Combobox1 selected item:Apple Combobox2 selected item:Plum Text FILE: APPLE|Pear|Plum|Orange 1|2|3|4 215|3|45|98 125|498|76|4 4165|465|4|65 Resulting File: 1|3 215|45 125|76 4165|4 Thanks for the advice, i dont need help on adding to combobox or reading the files, just how to create a file from a delimited file having multiple columns.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >