Daily Archives

Articles indexed Saturday October 19 2013

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

  • How to get the place name by latitude and longitude using openstreetmap in android

    - by Gaurav kumar
    In my app i am using osm rather than google map.I have latitude and longitude.So from here how i will query to get the city name from osm database..please help me. final String requestString = "http://nominatim.openstreetmap.org/reverse?format=json&lat=" + Double.toString(lat) + "&lon=" + Double.toString(lon) + "&zoom=18&addressdetails=1"; RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(requestString)); try { @SuppressWarnings("unused") Request request = builder.sendRequest(null, new RequestCallback() { @Override public void onResponseReceived(Request request, Response response) { if (response.getStatusCode() == 200) { String city = ""; try { JSONValue json = JSONParser.parseStrict(response); JSONObject address = json.isObject().get("address").isObject(); final String quotes = "^\"|\"$"; if (address.get("city") != null) { city = address.get("city").toString().replaceAll(quotes, ""); } else if (address.get("village") != null) { city = address.get("village").toString().replaceAll(quotes, ""); } } catch (Exception e) { } } } }); } catch (Exception e1) { }

    Read the article

  • How to covert UTF8 string to UTF16 in JNI

    - by Er Rahul Rajkumar Gupta
    Can anyone please tell me that what is going on wrong with me in this code.Actually in following line of codes I am taking the path of sdcard in a string in jni (C code) and in concatenate function concatenating these manually using loop.The string returned by concatenate works fine but when I am converting it to jstring it prints garbage value in my logcat. Kindly tell me what is the problem. jstring str=(jstring)env->CallObjectMethod(sdcard,storagestring); const char jclass cfile=env->FindClass("java/io/File"); jmethodID fileid=env->GetMethodID(cfile,"<init>","(Ljava/lang/String;)V"); jclass envir=env->FindClass("android/os/Environment"); jmethodID storageid=env->GetStaticMethodID(envir,"getExternalStorageDirectory","()Ljava/io/File;"); jobject sdcard=env->CallStaticObjectMethod(envir,storageid); jclass sdc=env->GetObjectClass(sdcard); jmethodID storagestring=env->GetMethodID(sdc,"toString","()Ljava/lang/String;"); *nativeString = env->GetStringUTFChars(str, 0); char *s =concatenate(nativeString,"/f1.3gp"); //fpath=s; fpath=env->NewStringUTF(s); jobject fobject=env->NewObject(cfile,fileid,fpath); LOGI("size of char=%d size of string=%d",sizeof("/f1.3gp"),sizeof(fpath)); jmethodID existid=env->GetMethodID(cfile,"exists","()Z"); if(env->CallBooleanMethod(fobject,existid)) { jmethodID delid=env->GetMethodID(cfile,"delete","()Z"); if(env->CallBooleanMethod(fobject,delid)) LOGE("File is deleting...%s",env->NewStringUTF("/f1.3gp")); } jmethodID newfileid=env->GetMethodID(cfile,"createNewFile","()Z"); if(env->CallBooleanMethod(fobject,newfileid)) LOGE("dig dig %s",fpath); jthrowable exc=env->ExceptionOccurred(); if(exc) { env->ExceptionDescribe(); env->ExceptionClear(); } LOGE("creating file %s",fpath); }

    Read the article

  • modify this code .. please help me?

    - by Sam
    i wana modify this code from static choices to dynamic this for 3 choices var PollhttpObject=null; function DoVote() {if(document.getElementById('PollRadio1').checke d)DoVote_Submit(1);else if(document.getElementById('PollRadio2').checked)DoVote_Submit(2);else if(document.getElementById('PollRadio3').checked)DoVote_Submit(3);else alert('?????: ?????? ?????? ??? ?????????? ??????? ?? ????? ??? ?? ???????');return false;} function DisbalePoll(TheCase) {document.getElementById('VoteBttn').onclick=function(){alert('!?????? ??? ?? ??????? ??????');} document.getElementById('PollRadio1').disabled='true';document.getElementById('PollRadio2').disabled='true';document.getElementById('PollRadio3').disabled='true';if(TheCase=='EXPIRED') {document.getElementById('VoteBttn').src='images/design/VoteBttn_OFF.jpg';document.getElementById('ResultBttn').src='images/design/ResultsBttn_OFF.jpg';document.getElementById('VoteBttn').onclick='';document.getElementById('ResultBttn').onclick='';document.getElementById('ResultBttn').style.cursor='';document.getElementById('VoteBttn').style.cursor='';}} function DoVote_Submit(VoteID) {if(VoteID!=0)DisbalePoll();try{PollhttpObject=getHTTPObject();if(PollhttpObject!=null) {PollhttpObject.onreadystatechange=PollOutput;PollhttpObject.open("GET","Ajax.aspx?ACTION=POLL&VOTEID="+ VoteID+"&RND="+ Math.floor(Math.random()*10001),true);PollhttpObject.send(null);}} catch(e){} return false;} function PollOutput(){if(PollhttpObject.readyState==4) {var SearchResult=PollhttpObject.responseText;document.getElementById('PollProgress').style.display='none';document.getElementById('PollFormDiv').style.display='block';if(SearchResult.length=2&&SearchResult.substr(0,2)=='OK') {var ReturnedValue=SearchResult.split("#");document.getElementById('PollBar1').style.width=0+'px';document.getElementById('PollBar2').style.width=0+'px';document.getElementById('PollBar3').style.width=0+'px';document.getElementById('PollRate1').innerHTML="0 (0%)";document.getElementById('PollRate2').innerHTML="0 (0%)";document.getElementById('PollRate3').innerHTML="0 (0%)";window.setTimeout('DrawPollBars(0, '+ ReturnedValue[1]+', 0, '+ ReturnedValue[2]+', 0, '+ ReturnedValue[3]+')',150);} else if(SearchResult.length=2&&SearchResult.substr(0,2)=='NO') {alert("?????: ??? ??? ???????? ?????");}} else {document.getElementById('PollProgress').style.display='block';document.getElementById('PollFormDiv').style.display='none';}} function DrawPollBars(Bar1Var,Bar1Width,Bar2Var,Bar2Width,Bar3Var,Bar3Width) {var TotalVotes=parseInt(Bar1Width)+parseInt(Bar2Width)+parseInt(Bar3Width);var IncVal=parseFloat(TotalVotes/10);var NewBar1Width=0;var NewBar2Width=0;var NewBar3Width=0;var Bar1NextVar;var Bar2NextVar;var Bar3NextVar;if(parseInt(parseInt(Bar1Var)*200/TotalVotes)0)NewBar1Width=parseInt(Bar1Var)*200/TotalVotes;else if(Bar1Var0)NewBar1Width=1;else NewBar1Width=0;if(parseInt(parseInt(Bar2Var)*200/TotalVotes)0)NewBar2Width=parseInt(Bar2Var)*200/TotalVotes;else if(Bar2Var0)NewBar2Width=1;else NewBar2Width=0;if(parseInt(parseInt(Bar3Var)*200/TotalVotes)0)NewBar3Width=parseInt(Bar3Var)*200/TotalVotes;else if(Bar3Var0)NewBar3Width=1;else NewBar3Width=0;document.getElementById('PollBar1').style.width=NewBar1Width+'px';document.getElementById('PollBar2').style.width=NewBar2Width+'px';document.getElementById('PollBar3').style.width=NewBar3Width+'px';document.getElementById('PollRate1').innerHTML=parseFloat(Bar1Var).toFixed(0)+" ("+ parseFloat(parseFloat(Bar1Var)/TotalVotes*100).toFixed(1)+"%)";document.getElementById('PollRate2').innerHTML=parseFloat(Bar2Var).toFixed(0)+" ("+ parseFloat(parseFloat(Bar2Var)/TotalVotes*100).toFixed(1)+"%)";document.getElementById('PollRate3').innerHTML=parseFloat(Bar3Var).toFixed(0)+" ("+ parseFloat(parseFloat(Bar3Var)/TotalVotes*100).toFixed(1)+"%)";if(Bar1Var!=Bar1Width||Bar2Var!=Bar2Width||Bar3Var!=Bar3Width) {if(parseFloat(Bar1Var)+IncVal<=parseInt(Bar1Width))Bar1NextVar=parseFloat(Bar1Var)+IncVal;else Bar1NextVar=Bar1Width;if(parseFloat(Bar2Var)+IncVal<=parseInt(Bar2Width))Bar2NextVar=parseFloat(Bar2Var)+IncVal;else Bar2NextVar=Bar2Width;if(parseFloat(Bar3Var)+IncVal<=parseInt(Bar3Width))Bar3NextVar=parseFloat(Bar3Var)+IncVal;else Bar3NextVar=Bar3Width;window.setTimeout('DrawPollBars('+ Bar1NextVar+', '+ Bar1Width+', '+ Bar2NextVar+', '+ Bar2Width+', '+ Bar3NextVar+', '+ Bar3Width+')',80); }}

    Read the article

  • Selecting Data from select tag

    - by user2610240
    i have to select data from select tag rather then selecting value as its selects value for default <select name="time" > <option selected="selected" >timings</option> <option value="155">9:00AM - 12:00PM</option> <option value="244">12:00AM - 15:00PM</option> </select> I want to select 12:00AM - 15:00PM values and store it in my DB. How to do it any ideas. Thanks in advance Ameeth

    Read the article

  • C# WebClient list

    - by Linton day
    Hello Im trying to make a chat program like skype in c# and having some trouble gavring/updating the messages, what i tryed was foreach value in a database add it into listbox1, and i did a timer every second do that.. but it kept adding it again every second repeating like it was on loop So then i sat down and thought how can i do this, so i come up with webclient download a list of messages by php and foreach line in the webclient add it to a listbox! is there any way of doing this?

    Read the article

  • how can i Create looper in timer

    - by Yogesh Ude
    private static final long UPDATE_INTERVAL = 1* 60 * 1000; private Timer timer = new Timer(); public int onStartCommand(Intent intent, int flags, int startId) { timer.scheduleAtFixedRate(new TimerTask() { mLocationManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, LOCATION_INTERVAL, LOCATION_DISTANCE, mLocationListeners[0]); }, 0, UPDATE_INTERVAL); return START_STICKY; }

    Read the article

  • removing index.php of codeigniter on local

    - by Aldi Aryanto
    i'm trying to remove index.php,in my localhost, but it seems doesn't working,its on http://localhost/testing i put .htacces in 'testing' directory under the htdocs LoadModule rewrite_module modules/mod_rewrite.so at apache/conf also already uncheck here my .htaccess RewriteEngine On RewriteBase /testing/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /testing/index.php/$1 [L] here my config $config['base_url'] = "http://localhost/testing"; $config['index_page'] = ''; $config['uri_protocol'] = 'AUTO'; when i access login controller, it's not found Not Found The requested URL /testing/login was not found on this server. I really don't know what to try next. Any help would be appreciated.

    Read the article

  • Socket error in python

    - by Alice Everett
    I am using python-monetdb 11.16.0.7. I created my database farm and database according to instructions given below (source: http://www.monetdb.org/Documentation/monetdbd) % monetdbd start /home/my-dbfarm % monetdb create my-first-db Then I tried to connect to the database using the below mentioned command in python(https://pypi.python.org/pypi/python-monetdb/). Upon doing so I am getting the below mentioned error: >import monetdb.sql >connection=monetdb.sql.connect(username="monetdb",password="monetdb",hostname="localhost",database="my-first-db"); File "/usr/local/lib/python2.7/dist-packages/monetdb/sql/__init__.py", line 28, in connect return Connection(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/monetdb/sql/connections.py", line 58, in __init__ unix_socket=unix_socket) File "/usr/local/lib/python2.7/dist-packages/monetdb/mapi.py", line 93, in connect self.socket.connect((hostname, port)) File "/usr/lib/python2.7/socket.py", line 224, in meth return getattr(self._sock,name)(*args) socket.error: [Errno 111] Connection refused Can someone please help me with this?

    Read the article

  • Apply CSS Style on all elements except with a SPECIFIC ID

    - by Rajesh Paul
    CSS Code(what I need) <style> div[id!='div1']// I actually needed an inequality operator for NOT EQUAL TO { font-size:40px; } </style> HTML code <body> <div>abc</div> <div>def</div> <div id='div1'>ghi</div> </body> The CSS didn't work as I intended. I actually wanted to define the style for all <div>-elements except the one with id='div1'. How can I do that?

    Read the article

  • Serialize object from within

    - by Maximus
    I have the class testClass which has the method save. This method saves object to a database. But it needs to serialize object before saving. How can I serialize object from within the class to do that? class testClass { private $prop = 777; public function save() { $serializedObject = serialize(self); DB::insert('objects', array('id', 'object')) ->values(array(1, $serializedObject)) ->execute(); } } serialize(self) obviously doesn't work.

    Read the article

  • Syncing a table records with a Service response frequently

    - by Karthik Dheeraj
    I am requesting data from a service whose response in stored in a database.First, I have an empty table, whenever I make my very first request the records from the service comes to my database table. from now, whenever I make second request, the service will provide me some records which may be same as my first response, may be new records, may be updated records etc. my query is to how to update my table with respect to the responses coming from the service during my second request on-wards? so that Unchanged records will remain same, New records will be added, updated records will be updated.Do I need to write any stored procedure on my DB or any workaround ?what might be the scenario if I use Nomysql DB's like mongo DB ? Thanks In Advance.

    Read the article

  • what is a root directory in IIS 6 and How do I make one of my subfolder in ASP.NET website the root directory?

    - by R_Coder
    I need to integrate a third party plugin in my asp.net website. To install the plugin, they have mentioned this sentence, "Create an application through your IIS control panel with root directory at -(some path from my website folder)?". I am not much aware with IIS and rarely worked with it. Though I tried every possible way i could do in IIS, I am not able to work it out. After installation, there is a test page provided by plugin which i have to run to check but when I run it, it shows this error. "It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS." I searched this error too and found that it is because the two Web.Config file, one from the main project and another from plugin folder. The only way to work with this is to make the plugin folder they specified as root directory in IIS. Someone kindly tell me some easy steps to do this. What I was doing is, in IIS6, I added New website with the main folder of my asp.net website, then I right clickadd application and choosed the gievn path, thought it would become root directory but it ain't. Help would be appreciated. ALso note that, i have to put the plugin folder in my main website folder only. So, there are two web.config. I tried to rename one of them too, it solved the above error but gave another errors but I think main problem is of root directory. P.S they show me above error on web.config file of plugin folder on this sentence- "Line 51: < authentication mode="Windows" />"

    Read the article

  • My google map android app keeps crashing

    - by Manny264
    I have followed about two tutorials from vogella and some other tutorial that looked similar...very similar but to no avail. I load the app on my nexus 7 and it just crashes "Unfortunately MyMapView has stopped working" on launch.This is the manifest: ` <uses-sdk android:minSdkVersion="17" android:targetSdkVersion="17" /> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <uses-library android:name="com.google.android.maps" /> <activity android:name="com.macmozart.mymapview.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBZ1Bt7rjB863Jy-B05zls6k8XZsBGQ6-4" /> </application> ` Followed by my main layout: <fragment android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" class="com.google.android.gms.maps.MapFragment" /> and finally my java class: package com.macmozart.mymapview; import android.app.Activity; import android.os.Bundle; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.MapFragment; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.Marker; import com.google.android.gms.maps.model.MarkerOptions; import com.google.android.maps.*; public class MainActivity extends Activity { static final LatLng HAMBURG = new LatLng(53.558, 9.927); static final LatLng KIEL = new LatLng(53.551, 9.993); private GoogleMap map; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)) .getMap(); if (map != null) { Marker hamburg = map.addMarker(new MarkerOptions() .position(HAMBURG).title("Hamburg")); Marker kiel = map.addMarker(new MarkerOptions() .position(KIEL) .title("Kiel") .snippet("Kiel is cool") .icon(BitmapDescriptorFactory .fromResource(R.drawable.ic_launcher))); map.moveCamera(CameraUpdateFactory.newLatLngZoom(HAMBURG, 15)); // Zoom in, animating the camera. map.animateCamera(CameraUpdateFactory.zoomTo(10), 2000, null); } } } Any idea what im doing wrong I really need this to work

    Read the article

  • Calculate NSString size to adjust UITextField frame

    - by Bernd Plontsch
    I have issues calculating the accurate size of a NSString displayed in a UITextField. My goal is to update the textfield frame size according to the string size programmatically (without using sizeToFit). I am using the sizeWithFont function. -(void)resizeTextFieldAccordingToText:(NSString*)textFieldString { CGPoint originalCenter = self.textField.center; UIFont* currentFont = [textField font]; CGSize newSize = [textFieldString sizeWithFont:currentFont]; //Same incorrect results with the extended version of sizeWithFont, e.g. //[textFieldString sizeWithFont:currentFont constrainedToSize:CGSizeMake(300.0, 100.0) lineBreakMode:NSLineBreakByClipping]; [self.textField setFrame:(CGRectMake(self.textField.frame.origin.x, self.textField.frame.origin.y, newSize.width, newSize.height))]; [self.textField setCenter:originalCenter]; } Problem: While this return correct size results at first its becomes more and more unprecise by adding characters therefore finally starts clipping the string (as seen in the right screenshot). How do I get the accurate size of the textField string for correctly adjusting its size?

    Read the article

  • Get the count of login datetime and username from the textfile

    - by user2897388
    I am having a textfile with usename, userid, login and logout time. From this textfile I need to get the userid and howmany times that user logged in on that particular date. I am doing this one using C# (.NET) in windows applications. I tried this code but I am getting the whole text into the string strRead. In that strRead I need to get the count of user login basing on date. StreamReader strmrdr = new StreamReader("Logfiles.txt"); string strRead = strmrdr.ReadToEnd(); Username:Rajini||UserId:abc||Userlogintime:10/19/13 12:33:29 PM||UserLogoutTime:10/19/13 12:33:57 PM Username:Rajini||UserId:abc||Userlogintime:10/19/13 12:35:29 PM||UserLogoutTime:10/19/13 12:36:57 PM

    Read the article

  • If a NSView uses autolayout, do all of its subviews also need to use autolayout for positioning?

    - by boyfarrell
    I have a view in a window, the position and size of the view are calculated with autolayout. The view has a subview, a draggable NSView subclass. It is really easy to make a NSView "draggable" by overriding -mouseDown: and -mouseDragged: and changing the frame of the view directly. The view hierarchy is as follows, What is the best way of making the subview draggable in this case? For example, Is it possible for the subview to not use autolayout, so that it can be positioned by changing the frame directly? i.e. the window positions the main view, but then autolayout does not layout the subview inside the main view. Or to all views in the hierarchy need to use autolayout. When I have used autolayout before, I have used it to make "fixed" layout that respond to resizing. But dragging a view with a mouse does't seems like a natural use case for autolayout.

    Read the article

  • Toottip data issue in jquery flot

    - by Muhammad
    I am using Jquery plot.Every thing is working except tooltip data. Total data shown on a line is 190 which is equal to total published PLUS total unpublished.Total Published is 51 which is shown in tooltip.Now the other portion of tooltip shows 190 instead of 190-51 = 139 here is my code var options1 = { series: {stack: stack, lines: { show: lines, fill: false, steps: steps }, bars: { show: bars, barWidth: 0.4 }, points: { show: true} }, grid: { hoverable: true //IMPORTANT! this is needed for tooltip to work }, tooltip: true, tooltipOpts: { content: "%s : %y", shifts: { x: -60, y: 25 } }, legend:{'position':'ne','show':true,'margin':[-3, -20],'backgroundOpacity':0.1, 'noColumns': 4, 'container': null}, xaxis: {ticks: dest4 ,}, }; what i should do with this line to show exact data content: "%s : %y",

    Read the article

  • HTML5 - Need explanation about outline

    - by RhymeGuy
    So, lets say that I have the following structure: <doctype html> <header> <h1>Header</h1> <article><h2>Article</h2></article> <article><h2>Article</h2></article> </header> <main> <h1>Main content</h1> <article><h2>Article</h2></article> <article><h2>Article</h2></article> <article><h2>Article</h2></article> <article><h2>Article</h2></article> </main> <section> <h1>Sidebar</h1> </section> If i check outline using http://gsnedders.html5.org/outliner/ (or any other), I'll get outline like this: 1. Main content 1. Header 1. Article 2. Article 2. Article 3. Article 4. Article 5. Article 6. Sidebar Which (from my understanding) is not correct. I have thought that it should look like this: 1. Header 1. Article 2. Article 2. Main content 1. Article 2. Article 3. Article 4. Article 3. Sidebar Why this happens? I can get desired outline if I use section element. But id there is main element in HTML structure, then everything breaks (at least for me - it's not how I understood it). Can I achieve desired outline using main element?

    Read the article

  • Send location with message on windows phone

    - by Ivan Crojach Karacic
    I am developing an app and would like to attach my location to a message and make this location "clickable" so that they can see it on a map/get a link which opens a map. I am getting the correct location and store it into currentPosition but I am not able to send it so that the user can click on the link/map and see where I am. Is this even possible with the Windows Phone var smsComposeTask = new SmsComposeTask(); var message = Message; message += string.Format("\r\n My location is\r\n {0}",_currentPosition); smsComposeTask.Body = message; smsComposeTask.Show();

    Read the article

  • PROLOG - DCG parsing

    - by user2895589
    Hello I am new Prolog and DGC.I want to write a DCG to parse time expressions like 10.20 am or 12 oclock. how can I check 10.20 am is valid expression or not for Olcock I wrote some code. oclock --> digit1,phrase1. digit1 --> [T],{digit1(T)}. digit1(1). digit1(2). digit1(3). digit1(4). digit1(5). digit1(6). digit1(7). digit1(8). digit1(9). digit1(10). digit1(11). digit1(12). phrase1 --> [P],{phrase1(P)}. phrase1(Oclock). i ma checking by query oclock([1,oclock],[]). can someone help me on this.

    Read the article

  • How do you diagnose a 500 error on Heroku when there is no error message in the logs?

    - by lala
    I have a Rails app on Heroku that is serving 500 errors at random intervals. Web pages will display "Internal server error" in plain text, instead of the usual "We're sorry. Something went wrong." page. When I refresh the page, it works fine. The logs don't show me an error message, just » 14:20:34.107 2013-10-11 12:20:33.763690+00:00 heroku router - - at=info method=HEAD path=/ host=www.mydomain.com fwd="184.73.237.85/ec2-184-73-237-85.compute-1.amazonaws.com" dyno=web.1 connect=1ms service=63ms status=200 bytes=0 » 14:21:03.957 2013-10-11 12:21:03.561867+00:00 heroku router - - at=info method=GET path=/ host=www.mydomain.com fwd="50.112.95.211/ec2-50-112-95-211.us-west-2.compute.amazonaws.com" dyno=web.1 connect=0ms service=1ms status=500 bytes=21 Support has told me to look at request queuing in New Relic, but New Relic only shows a big red mark saying the server is down (even though the site works fine when refreshed). With no error messages, I'm at a loss for how to diagnose this issue.

    Read the article

  • How to find next (by a single parameter) element in c++? (stl) [closed]

    - by user2136963
    I have n humans of THuman class Each human has scored some points in one of two rounds. (score1 and score2) Each human has its unique id. Score1 and 2 are also unique. Besides, a human has a score_t=score1+score2, which can be the same for two of them. I need to implement 6 variables to THuman which return id of a human with: bigger score1 smaller score1 bigger score2 smaller score2 bigger score_t smaller score_t (if there are many humans those satisfy theese conditions, the one with smallest difference of corresponding parameter should be chosen (like score1 for 1 and 2)) In other words, it's some kind of storing 3 human sortings. Two more functions I need should get argument x, set score1 or score 2 to x, and then refresh some of the 6 variables above. If I needed sorting by only one variable, I would simply create set and defined and < operators for my class. But what is the solution for three of parameters? Is it possible to use STL here, or I should create my own lists/treaps? __ Answer: How to update set of pointers c++?

    Read the article

  • Where can I find "canonical" sample programs that give quick refreshers for any given language? [on hold]

    - by acheong87
    Note to those close-voting this question: I understand this isn't a conventional programming question and I can agree with the reasoning that it's in the subjective domain (like best-of lists). In other ways though I think it's appropriate because, though it's not a "a specific programming problem," nor concerning "a software algorithm", nor (strictly) concerning "software tools commonly used by programmers", I think it is a "practical, answerable [problem that is] unique to the programming profession," and I think it is "based on an actual [problem I] face." I've been wanting this for some time now, because both approaches of (a) Googling for samples as I write every other line of code and (b) just winging it and seeing what errors crop up, distract me from coding efficiently. This note will be removed if the question gains popularity; this question will be deleted otherwise. I spend most of my time developing in C++, PHP, or Javascript, and every once in a while I have to do something in, say, VBA. In those times, it'd be convenient if I could just put up some sample code on a second monitor, something in between a cheat sheet (often too compact; and doesn't resemble anything that could actually compile/run), and a language reference (often too verbose, or segmented; requires extra steps to search or click through an index), so I can just glance at it and recall things, like how to loop through non-empty cells in a column. I think there's a hidden benefit to seeing formed code, that triggers the right spots in our brains to get back into a language we only need to brush up on. Similar in spirit is how http://ideone.com lets you click "Template" in any given language so you can get started without even doing a search. That template alone tells a lot, sometimes! Case-sensitivity, whitespace conventions, identifier conventions, the spelling of certain types, etc. I couldn't find a resource that pulled together such samples, so if there indeed doesn't exist such a repository, I was hoping this question would inspire professionals and experts to contribute links to the most useful sample code they've used for just this purpose: a keep-on-the-side, form-as-well-as-content, compilable/executable, reminder of a language's basic and oft-used features. Personally I am interested in seeing "samplers" for: VBA, Perl, Python, Java, C# (though for some of these autocompleters in Eclipse, Visual Studio, etc. help enough), awk, and sed. I'm tagging c++, php, and javascript because these are languages for which I'd best be able to evaluate whether proffered sample code matches what I had in mind.

    Read the article

  • Mac theme for Firefox

    - by Anirudha
    Originally posted on: http://geekswithblogs.net/anirugu/archive/2013/10/19/mac-theme-for-firefox.aspxFrom a long time There is a theme for Firefox that is called MacOSX Theme This is used for make Firefox appearance like Mac. The bad news about this add-ons is that this plugin doesn’t maintain as good as it should be. Now this add-ons theme doesn’t work current Firefox. Don’t worry. You can got it f1beta.com/macosx_theme_firefox_4-1.8.1-fx.xpi  Note:-  This plugin is work of https://addons.mozilla.org/en-US/firefox/user/golf-at/ and found online https://addons.mozilla.org/en-US/firefox/addon/macosx-theme-firefox-4/?src=api I just patch it for people who have problem with installing it on latest Firefox. You can still use This theme from original site with this hack https://addons.mozilla.org/en-US/firefox/addon/checkcompatibility/ this plugin make the unsupported plugin worked.

    Read the article

  • APress Deal of the Day 19/Oct/2013 - Software Projects Secrets Why Projects Fail

    - by TATWORTH
    Originally posted on: http://geekswithblogs.net/TATWORTH/archive/2013/10/19/apress-deal-of-the-day-19oct2013---software-projects-secrets.aspxTod\y's $10 deal of the day from APress at http://www.apress.com/9781430251019 is Software Projects Secrets Why Projects Fail "Software Project Secrets: Why Software Projects Fail airs dirty laundry about the software industry—how putting project management's priorities above all else is the root cause of problems in software development projects. This book offers solutions to integrate project management with agile methodologies that really work for software development."

    Read the article

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