Daily Archives

Articles indexed Saturday June 7 2014

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

  • I have submitted app to app store and app status came like 'Metadata Rejected' and following review status. I do not have login page

    - by user3717465
    We began the review of your app but are not able to continue because we need a demo account to fully access your app features. Please provide demo account details in the Review Notes section of the Version Information for your app. Please ensure that the information you provide includes any data necessary to demonstrate the functionality of your app features. You can provide demo account information, including passwords, in the Review Notes section of your iTunes Connect App Information. While your iTunes Connect Application State shows as Metadata Rejected, we don't require a new binary to correct this issue. Please visit iTunes Connect, Manage Your Applications. Select your app, then click View Details of the desired version. Click the Edit button next to Version Information to edit the Review Notes for your app, then click "Save". how to correct the meta data. because i do not have login account.

    Read the article

  • Button with cell inside to big

    - by josh_24_2
    When i load it loads its cell with the button inside to big.Link to an example image: http://i.stack.imgur.com/x5j40.jpg. Also is there a way to change size of cells :) Please help me, If you need more info please must ask and I will be happy to give more information. <div class="content"> <?php $con = mysql_connect("","",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("", $con); $result = mysql_query("SELECT * FROM users ORDER by user_id"); echo "<link rel='stylesheet' href='<?php echo URL; ?>public/css/style.css' /><div class='CSSTableGenerator' > <table > <tr> <td> </td> <td> ID </td> <td > Username </td> <td> Email </td> <td> Admin </td> <td> User Active </td> </tr>"; while($row = mysql_fetch_array($result)) { if ($row['user_perm_level'] == "2") { $admin = 'Yes'; } else { $admin = 'No'; } if ($row['user_active'] == "1") { $active = 'Yes'; } else { $active = 'No'; } echo "<tr>"; echo "<td><input type='checkbox' name='1' value='1'></td>"; echo "<td>" . $row['user_id'] . "</td>"; echo "<td>" . $row['user_name'] . "</td>"; echo "<td>" . $row['user_email'] . "</td>"; echo "<td>" . $admin . "</td>"; echo "<td>" . $active . "</td>"; echo "</tr>"; } echo "</table></div>"; mysql_close($con); ?> </div> Thanks josh_24_2

    Read the article

  • IOS where to put the configuration of facebook sdk

    - by Carol Smith
    I am trying to integrated my IOS 7 application with Facebook SDK I following this official tutorial https://developers.facebook.com/docs/ios/getting-started which states Configure the .plist Follow these three steps: Create a key called FacebookAppID with a string value, and add the app ID there. Create a key called FacebookDisplayName with a string value, and add the Display Name you configured in the App Dashboard. Create an array key called URL types with a single array sub-item called URL Schemes. Give this a single item with your app ID prefixed with fb. This is used to ensure the application will receive the callback URL of the web-based OAuth flow. The finished .plist should look something like this: My question is where to put these values? They already put this image, maybe it helps you to answer me Edit The problem that I don't have any plist file in my framework in xcode and I can't add a new one because if i did, I would have to add all the variables that you see in the image but the tutorial just stated about some of them

    Read the article

  • spidermonkey using JS_CallFunction for static function

    - by supersuraccoon
    JS_CallFunctionName can call a method of an object by name: JSObject* obj; JS_CallFunctionName(cx, obj, "doSomething", argc, vp, retVal); The code above works fine if the "doSomething" is a function declared in the prototype of the "obj". What I want to know is if there is a way to call a function that is a "class function". I tried: if(JS_HasProperty(getGlobalContext(), getGlobalObject(), "ClassToGet", &b)) { print("OK"); } and the output is "OK". But when tried: JS_GetProperty(getGlobalContext(), getGlobalObject(), "ClassToGet", &jsOwner); if (jsOwner != JSVAL_VOID) { } the jsOwner is a JSVAL_VOID. Maybe there is a function in SpiderMonkey can execute function in a JSClass ? Any suggestion will be appreciated, thanks :)

    Read the article

  • Exception handling in Spring MVC with 3 layer architecture

    - by Chorochrondochor
    I am building a simple web applications with 3 layers - DAO, Service, MVC. When in my Controller I want to delete menu group and it contains menus I am getting ConstraintViolationException. Where should I handle this exception? In DAO, Service, or in Controller? Currently I am handling the exception in Controller. My code below. DAO method for deleting menu groups: @Override public void delete(E e){ if (e == null){ throw new DaoException("Entity can't be null."); } getCurrentSession().delete(e); } Service method for deleting menu groups: @Override @Transactional(readOnly = false) public void delete(MenuGroupEntity menuGroupEntity) { menuGroupDao.delete(menuGroupEntity); } Controller method for deleting menu groups in Controller: @RequestMapping(value = "/{menuGroupId}/delete", method = RequestMethod.GET) public ModelAndView delete(@PathVariable Long menuGroupId, RedirectAttributes redirectAttributes){ MenuGroupEntity menuGroupEntity = menuGroupService.find(menuGroupId); if (menuGroupEntity != null){ try { menuGroupService.delete(menuGroupEntity); redirectAttributes.addFlashAttribute("flashMessage", "admin.menu-group-deleted"); redirectAttributes.addFlashAttribute("flashMessageType", "success"); } catch (Exception e){ redirectAttributes.addFlashAttribute("flashMessage", "admin.menu-group-could-not-be-deleted"); redirectAttributes.addFlashAttribute("flashMessageType", "danger"); } } return new ModelAndView("redirect:/admin/menu-group"); }

    Read the article

  • Binary XML file <line 20>: Error inflating class <Unknown>

    - by user2750644
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_gravity="top|left|right" android:background="@drawable/bg" tools:context=".MainActivity" > <ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="50dp" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:src="@drawable/top_red_bar" android:layout_alignParentLeft="true" android:paddingLeft="0dp" android:scaleType="centerCrop" /> <ImageView android:id="@+id/imageView2" android:layout_width="wrap_content" android:layout_height="45dp" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_alignTop="@+id/imageView1" android:layout_centerHorizontal="true" android:src="@drawable/job_bar" /> <ImageView android:id="@+id/imageView3" android:layout_width="238dp" android:layout_height="50dp" android:layout_below="@+id/imageView1" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:layout_marginTop="123dp" android:src="@drawable/button" android:alpha="0.85" android:onClick="myhandler"/> <ImageView android:id="@+id/imageView4" android:layout_width="wrap_content" android:layout_height="50dp" android:layout_alignParentLeft="true" android:layout_below="@+id/imageView3" android:layout_marginTop="24dp" android:src="@drawable/button" android:alpha="0.85"/> <ImageView android:id="@+id/imageView5" android:layout_width="35dp" android:layout_height="45dp" android:layout_above="@+id/imageView4" android:layout_alignLeft="@+id/imageView3" android:layout_marginLeft="21dp" android:src="@drawable/employer" /> <ImageView android:id="@+id/imageView6" android:layout_width="50dp" android:layout_height="50dp" android:layout_alignLeft="@+id/imageView5" android:layout_alignTop="@+id/imageView4" android:src="@drawable/jobseekers" /> <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/imageView5" android:layout_centerHorizontal="true" android:layout_marginLeft="18dp" android:layout_toRightOf="@+id/imageView6" android:text="Employer" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="#ffffff" android:textStyle="bold" /> <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/textView1" android:layout_alignTop="@+id/imageView4" android:text="Job Seekers" android:textAppearance="?android:attr/textAppearanceLarge" android:textColor="#ffffff" android:textStyle="bold" /> </RelativeLayout> My app gets crashed with error statement Binary XML file <line 20>: Error inflating class <Unknown>. Why does this happen?? Could anyone fix this? And interestingly, when I remove all code except background, it works!!!

    Read the article

  • vb6 listbox list timer

    - by user3138338
    i want to iterate listbox list item with Timer1 . for example, if listbox list item have 'A','B','C' then i want to make run 'A' then run timer1 and after finish 'B' then run timer1 and so on maybe this is easy for someone but it not easy for me because Timer1 is continue looping and it make me some confused. sorry my bad english and anyone could enlight me i really much appreate! Private Sub Command1_Click() For xx = 0 To List3.listcount - 1 Timer1.Enabled = True Next xx End Sub Public Sub Timer1_Timer() some code.... . . End Sub

    Read the article

  • Absolute Centering Not Working in IE

    - by Vikas Ghodke
    I have a div which is centered in parent div, it working on all browser but not in ie, can you help me out with this. JSFIDDLE span.qbg3 { display: block; text-align: center; background: url(http://powerblanket.com/may2014/wp-content/uploads/2014/05/qbg3.png) no-repeat center center; background-size:cover; padding: 50px 20px; color: #fff; font-weight: 400; font-size: 30px; position: relative; margin-top: -20px; min-height: 350px; } span.inqbg3 { max-height: 100px; display: block; text-align: center; color: #fff; font-weight: 400; font-size: 40px; position: absolute; margin: auto; top: 0px; right: 0; left: 0; bottom: 0px; background: rgba(0, 0, 0, 0.5); max-width: 700px; padding: 35px 0; } span.inqbg3 a { color: #fff; }

    Read the article

  • vaadin custom layout setting a text area in a table with the location attribute

    - by user3717298
    I need to set a text area in the html template and use it as a custom component in vaadin the html snippet is as below <table> <tr> <td> JUNK SENTENCE </td> <td> <div location="HEADIN"></div> <div location="Details"></div> <div location="Attachment"></div> </td> <td> <p>School of more than 50 students univer versities.</p> </td> </tr> </table> All the place holders are working and displays data but the "details" holder should be a text area. as the text is a lot over there so I tried the below way but it just turned the place holder to text vaadin could not manipulate / identify the "Details" place holder. I tried the below way i set - in side the text area tag. <textarea rows="4" cols="50"> </textarea> and again i tried this way too which also did not work. <textarea rows="4" cols="50" location="Details"> </textarea> Any guidance would be appreciated to solve this I am setting the needed values from a formfeildfactory and these values are set by implementing the Vaadin Custom field class(in case it helps some more to identify)

    Read the article

  • Custom UITableviewcell shows "fatal error: Can't unwrap Optional.None" issue in swift

    - by user1656286
    I need to load a custom cell in a UITableView. I created a custom subclass of UITableViewCell named "CustomTableViewCell". I have added a UITabelViewCell to the tableview (using drag and drop) as shown in figure. Then in file inspector I set the class of that UITabelViewCell to be "CustomTableViewCell". Here is my code: class ViewController: UIViewController,UITableViewDelegate,UITableViewDataSource { @IBOutlet var tableView : UITableView var items = String[]() override func viewDidLoad() { super.viewDidLoad() items = ["Hi","Hello","How"] self.tableView.registerClass(CustomTableViewCell.self, forCellReuseIdentifier: "CusTomCell") // Do any additional setup after loading the view, typically from a nib. } func tableView(tableView: UITableView!, numberOfRowsInSection section: Int) -> Int{ return items.count } func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell!{ var cell:CustomTableViewCell = self.tableView.dequeueReusableCellWithIdentifier("CusTomCell") as CustomTableViewCell cell.labelTitle.text = items[indexPath.row] return cell; } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } } When I run my code, I get the following error: "fatal error: Can't unwrap Optional.None" as seen in the image.

    Read the article

  • How to get lng lat value from query results of geoalchemy2

    - by user2213606
    For exammple, class Lake(Base): __tablename__ = 'lake' id = Column(Integer, primary_key=True) name = Column(String) geom = Column(Geometry('POLYGON')) point = Column(Geometry('Point')) lake = Lake(name='Orta', geom='POLYGON((3 0,6 0,6 3,3 3,3 0))', point="POINT(2 9)") query = session.query(Lake).filter(Lake.geom.ST_Contains('POINT(4 1)')) for lake in query: print lake.point it returned <WKBElement at 0x2720ed0; '010100000000000000000000400000000000002240'> I also tried to do lake.point.ST_X() but it didn't give the expected latitude neither What is the correct way to transform the value from WKBElement to readable and useful format, say (lng, lat)? Thanks

    Read the article

  • Arduino crashes when sending bytes from Java [on hold]

    - by francisaugusto
    I used the sample program from the arduino website in order to send and receive data via serial to my Arduino one. However, for some reason, even when I try to send only one byte, the Arduino crashes after a while. It doesn't happen if I send the chars manually via the IDE's own serial monitor. I wrote the following method to output the character to Arduino: public synchronized void serialWrite(char sendIt){ try { output.write((byte)'0'); output.flush(); for (int j=0;j<1000000000;j++){ } }catch (Exception e){System.out.println("Not connected...");} notify(); } What I try above is to send just one character when the method is called. I send just a '0' char for testing. After manually calling the method two or three times, Arduino crashes. Is there anything I should be looking into? The Arduino code: #include <SoftwareSerial.h> int buttonState=0; int lastButtonState=0; int buttonPushCounter=0; long previousMillis=0; long interval=250; int ledState=LOW; int ledState2=LOW; int ledState3=LOW; long timeElapsed=0; SoftwareSerial portOne(10,11); void setup(){ pinMode(3,OUTPUT); pinMode(4,OUTPUT); pinMode(5,OUTPUT); pinMode(2,INPUT); Serial.begin(9600); portOne.begin(9600); } boolean turnoff; void loop(){ if(portOne.overflow()){ Serial.println("There's an overflow here!"); } buttonState= digitalRead(2); if(buttonState!=lastButtonState){ if (buttonState==HIGH){ buttonPushCounter++; } } lastButtonState=buttonState; if (turnoff){ unsigned long currentMillis=millis(); if (currentMillis-previousMillis>0 && currentMillis-previousMillis<interval){ ledState=HIGH; ledState2=LOW; ledState3=LOW; }else if (currentMillis-previousMillis>interval && currentMillis-previousMillis<interval*2){ ledState=LOW; ledState2=LOW; ledState3=HIGH; }else if (currentMillis-previousMillis>interval*2 && currentMillis-previousMillis<interval*3){ ledState=LOW; ledState2=HIGH; ledState3=LOW; }else if (currentMillis-previousMillis>interval*3){ previousMillis=currentMillis; } digitalWrite(3,ledState); digitalWrite(4,ledState2); digitalWrite(5,ledState3); }else{ digitalWrite(3,LOW); digitalWrite(4,LOW); digitalWrite(5,LOW); } if (buttonPushCounter==1){ Serial.print("Button pressed!\n"); turnoff=!turnoff; buttonPushCounter=0; } noInterrupts(); char ch=Serial.read(); delay(1); if(ch=='0'){ Serial.println("Changed by serial"+turnoff); Serial.println(ch); turnoff=!turnoff; } interrupts(); }

    Read the article

  • Splitting lists inside list haskell

    - by user3713267
    Hi I need to split list by an argument in Haskell. I found function like this group :: Int -> [a] -> [[a]] group _ [] = [] group n l | n > 0 = (take n l) : (group n (drop n l)) | otherwise = error "Negative n" But what if lists that I want to divide are contained by another list? For example group 3 [[1,2,3,4,5,6],[2,4,6,8,10,12]] should return [[[1,2,3],[4,5,6]],[[2,4,6],[8,10,12]]] Is there any way to do that ?

    Read the article

  • How to show and update popup in 1 thread

    - by user3713986
    I have 1 app. 2 Forms are MainFrm and PopupFrm, 1 thread to update some information to PopupFrm Now to update PopupFrm i use: In MainFrm.cs private PopupFrm mypop; MainFrm() { .... PopupFrm mypop= new PopupFrm(); mypop.Show(); } MyThread() { Process GetData();... mypop.Update(); ... } In PopupFrm.cs public void Update() { this.Invoke((MethodInvoker)delegate .... }); } Problem here that mypopup alway display when MainFrm display (Start application not when has data to update). So i change MainFrm.cs to : private PopupFrm mypop; private bool firstdisplay=false; MainFrm() { .... PopupFrm mypop= new PopupFrm(); //mypop.Show(); } MyThread() { Process GetData();... if(!firstdisplay) { mypop.Show(); firstdisplay=true; } mypop.Update(); ... } But it can not update Popup GUI. So how can i fix this issue ? Thanks all.

    Read the article

  • I am trying to insert value from combo box to database !! but this is not working

    - by user3675488
    At first I have taken some string in which I am trying to save the input values of textboxs and there is a combo box, I am trying to save the input value of the combo box to database, but this following code is unable to do that !!! what is the prob please help me. private void OK_Click(object sender, EventArgs e) { string sTxtcmpnyName = ""; string sTxtcmpnyAdd = ""; string sPhoneno = ""; string sTxtFax = ""; string sPanNo = ""; string sTxtTin = ""; string sTax = ""; string sAccYr = ""; string sComboSt = ""; foreach (Control c in this.Controls) ////*Adding Validation to the textbox.*// // Here the control is entered into GroupBox Grpcmp where c is denoting the name of the control into the groupbox. { // c1 is another control which denotes the textboxes under the GroupBox Grpcmp. foreach (Control c1 in c.Controls) { /////Now this following code snippets reperesents that the name of the company should not be blank. if (c1 is TextBox == true) // simpler that what you've done there { TextBox temp = (TextBox)c1; //The control is entering into Txtcompany. if (temp.Name == "Txtcompanyname") { //Condition checking is the TextBox is empty or Null then the following message will be shown. if ((temp.Text == "") || (temp.Text == "NULL")) { MessageBox.Show("Company Name should not be Blank"); } sTxtcmpnyName = temp.Text; } else if (c1.Name == "TxtcompanyAddress") { sTxtcmpnyAdd = c1.Text; } else if (c1.Name == "Txtphoneno") { sPhoneno = c1.Text; } else if (c1.Name == "TxtFax ") { sTxtFax = c1.Text; } else if (c1.Name == "Txtpanno") { sPanNo = c1.Text; } else if (c1.Name == "TxtTin") { sTxtTin = c1.Text; } else if (c1.Name == "Txtservicetax") { sTax = c1.Text; } //Now I am converting the TxtAcYr into Date format. //For this purpose two conditions are checked first. //First If the TextBox TxtAcYr is Null or empty it will show the message to enter the accountyear!! //Second If the length of the TextBox TxtAcYr is less than 10, it will again generate a message The date format should be in DD/MM/YYYY // Then the value of the use input will be picked using a For loop. if (c1.Name == "TxtAcYr") { sAccYr = c1.Text; //Here a string is taken named as yearlength and the value of the TxtAcYr is assigned to it by using control c1. //Condition Checking If the TextBox TxtAcYr is Null or empty it will show the message to enter the accountyear!! if ((c1.Text == "") || (c1.Text == "NULL")) { MessageBox.Show("Account Year should be entered!!"); } //Condition 2 is checking. Here the length of the string yearlength is whether equals to 10 or not is checked. //Because there are total 10 characters in Date Format along with special character. else // MessageBox.Show(yearlength.Length.ToString()); if (sAccYr.Length != 10) { MessageBox.Show("The Data Format DD-MM-YYYY"); } //Now the value of user will be picked by using the code snippets. else { //A string named as JK is taken for further use. String JK = ""; //This following loop is initiated to pick the user input. //The loop will check wheather the value of i is less than the length of string yearlength or not. //If Yes then it will go further. for (int i = 0; i < sAccYr.Length; i++) { //This condition is checking special characters. //The positions of special characters(Here '-') are placed at 2nd and 5th numbers. //So, the value of i can not be equals to 2 && 5. if ((i != 2) && (i != 5)) { //The new of value of year length i is assinged to the variable JK. JK = JK + sAccYr[i]; } //If the value of i is equals to 1, then enter the following. if (i == 1) { //*Should add the function of TOInt32* // If ToInt32(JK)>= the maximum length of days of a month then the following alert message will be shown. if (Convert.ToInt32(JK) >= 32) { MessageBox.Show("The Data Format DD-MM-YYYY"); } //**Comment should be added.** JK = ""; } else //If the value of i is equals to 4, then enter the following. if (i == 4) { //*Should add the function of TOInt32* // If ToInt32(JK)>= the maximum length of month then the following alert message will be shown. if (Convert.ToInt32(JK) >= 13) { MessageBox.Show("The Data Format DD-MM-YYYY"); } JK = ""; } } } } } else if (c1.Name == "state_cmb") { //sTxttate = c1.Text.ToString(); sComboSt = c1.Text; MessageBox.Show(c1.Text); } } } //////DATABASE CONNECTION///// try { SqlConnection conn = new SqlConnection(); SqlCommand cmd = new SqlCommand(); conn.ConnectionString = ("Data Source =192.168.0.2 ;database= Mee_Company; Persist Security Info =true; User ID =sa;Password = soso654321@"); conn.Open(); cmd.CommandText = ("INSERT INTO CompanyMaster(CompanyName,Address,State,Phone,Fax,PAN,TIN,STAX,AccountsYear)values('" + sTxtcmpnyName + "','" + sTxtcmpnyAdd + "','" + sComboSt + "','" + sPhoneno + "','" + sTxtFax + "','" + sPanNo + "','" + sTxtTin + "','" + sTax + "','" + sAccYr + "')"); //('" + sTxtcmpnyName + "', '" + TxtcompanyAddress.Text + "', '" + Txtphoneno.Text + "', '" + TxtFax.Text + "', '" + Txtservicetax.Text + "','" + TxtAcYr.Text + "')"); cmd.Connection = conn; cmd.ExecuteNonQuery(); conn.Close(); //cmd.Parameters.AddWithValue } catch (Exception ee) { MessageBox.Show(ee.ToString()); } } //An event is created here so that when the user will click on the Cancel Button, the Form will be closed. private void BtmCancle_Click(object sender, EventArgs e) { //this means the form. this.Close(); } //Another Event is created here named as TxtAcYr_KeyPress. //It is for making the TextBox TxtAcYr only allowance of numeric input along with special character '-'. private void TxtAcYr_KeyPress(object sender, KeyPressEventArgs e) { //If the input is number or '-' is checked //And also the backspace and delete option is enabled here. if (char.IsNumber(e.KeyChar) || e.KeyChar == (char)Keys.Back || e.KeyChar == (char)Keys.Delete || e.KeyChar == '-') { e.Handled = false; //ok } else { e.Handled = true; //not ok } }

    Read the article

  • How to close InAppBrowser itself in Phonegap Application?

    - by Shashi
    I am developing Phonegap application and currently i am using InAppBrowser to display external pages. On some of the external pages I place a close button and i want to close the InAppBrowser itself. because InAppBrowser displays these pages that is why the reference of it is not accessed on itself to close it and Please do not suggest me to use ChildBrowser Plugin. window.close(); //Not Worked for me or iabRef.close(); //Also not Worked for me because iabRef is not accessible on InAppBrowser. It is created on Parent Window Some of the Android device and iOS device display a Done Button to close it. As well as the iPad also display the Done button. but in Case of Android tablet there is not any kind of button to close it. UPDATE :- Here is my full code :- var iabRef = null; function iabLoadStart(event) { } function iabLoadStop(event) { } function iabClose(event) { iabRef.removeEventListener('loadstart', iabLoadStart); iabRef.removeEventListener('loadstop', iabLoadStop); iabRef.removeEventListener('exit', iabClose); } function startInAppB() { var myURL=encodeURI('http://www.domain.com/some_path/mypage.html'); iabRef = window.open(myURL,'_blank', 'location=yes'); iabRef.addEventListener('loadstart', iabLoadStart); iabRef.addEventListener('loadstop', iabLoadStop); iabRef.addEventListener('exit', iabClose); }

    Read the article

  • How to add an onclick event to a joint.js element?

    - by ahalbert
    I have a joint.js element in a DAG, and would like to be able to trigger an event by clicking on it. I could use $(selector).click(...) to do it, but I was wondering if there was a joint.js specific way of handling it, since that would probobly be better. One event I decided was a candidate for onclick was 'batch:stop' My code: var variable = new joint.shapes.basic.Rect({ name : label, id: label, onclick : function () {alert("hello");}, size: { width: width, height: height }, attrs: { text: { text: label, 'font-size': letterSize, 'font-family': 'monospace' }, rect: { fill : fillColor, width: width, height: height, rx: 5, ry: 5, stroke: '#555' } } }); variable.on('batch:stop', function (element) {alert(""); toggleEvidence(element.name);}); return variable; How should I add an onclick event?

    Read the article

  • Create and display indoor map on Android

    - by Lorenzo Barbagli
    I'm developing an Android application and I would like to display an internal (indoor) map of some buildings, but I don't know where to begin: I want to create a custom kml file (how it's possible to create it? with which tool?) and display it in a fragment. I already have it working with external maps (simple GoogleMap in MapFragment), so it would be super to have the kml file placed 'over' the GoogleMap, like real indoor maps. Thanks

    Read the article

  • loading files in prolog

    - by cubearth
    hey guys, am a bit of a newbie in Prolog. And am going thru this tutorial on line and it is telling me i can load other prolog files by typing: [filename]. but ever time I try this am getting ERROR: load_files/2: Arguments are not sufficiently instantiated. What am i doing wrong? P.S. the file is in the same directory as the one am working in. and here is a copy of the entire query and error. 12 ?- [KB5]. ERROR: load_files/2: Arguments are not sufficiently instantiated

    Read the article

  • Keeping Computer Science Writing Accessible and Eloquent

    - by Federer
    This question is particularly aimed at descriptions and explanations of what is happening in a computer program, as well as any general advice or approaches for undertaking technical reports in Computer Science at both undergraduate and graduate levels. You see, I am having particular difficulty in the best way to explain what is happening. As in, given any given program from a multi-agent system to a standard webservice, the best and most eloquent way to say exactly what is going on, the logic behind it and it's respective justifications. Should I avoid saying class names? Avoid specifying methods? Keep referring to class variables and any particular references? I'm banging my head against the wall at trying to keep a solid technical foundation and making it accessible to people of all backgrounds. Apologies for the rather vague question. Cheers.

    Read the article

  • What's the most straightforward way to typeset MLA-style college essays in LaTeX?

    - by bcat
    I've been using LaTeX for a little while now to typeset my algorithms homework, and I really like the quality of the output as well as the ease-of-use. I'd like to starting using LaTeX in other classes as well, but non–computer-science subjects have more stringent formatting requirements than I've come across in CS. Most classes that require essays want them to be formatted in MLA style, but I'm not sure what to best way to do that using LaTeX is. I've tried Googling "latex mla" and other similar things, but I've found many different MLA templates, and my LaTeX skills aren't good enough to determine which is the best. Is anyone else using LaTeX for "normal" essays, and, if so, how are you doing it?

    Read the article

  • WSUS is not using Akamai CDN for syncronisation source

    - by Geekman
    I've just installed a WSUS onto our network, and I'm currently doing the initial sync. I've found that WSUS does not seem to be talking to an Akamai cache, but rather with MS directly. This is contrary to what I've always thought regarding Windows Update traffic. Tcpdump of our WSUS server doing initial sync... As you can see it's speaking with 65.55.194.221. For me to speak to this IP, I have to go over international transit links. Which is of course not ideal. 8:42:31.279757 IP 65.55.194.221.https > XXXX.XXXX.XXXX.XXXX.50888: Flags [.], seq 4379374:4380834, ack 289611, win 256, length 1460 18:42:31.279759 IP 65.55.194.221.https > XXXX.XXXX.XXXX.XXXX.50888: Flags [.], seq 4380834:4382294, ack 289611, win 256, length 1460 18:42:31.279762 IP 65.55.194.221.https > XXXX.XXXX.XXXX.XXXX.50888: Flags [.], seq 4382294:4383754, ack 289611, win 256, length 1460 18:42:31.279764 IP 65.55.194.221.https > XXXX.XXXX.XXXX.XXXX.50888: Flags [P.], seq 4383754:4384144, ack 289611, win 256, length 390 18:42:31.279793 IP XXXX.XXXX.XXXX.XXXX.50888 > 65.55.194.221.https: Flags [.], ack 4369154, win 23884, length 0 18:42:31.279888 IP XXXX.XXXX.XXXX.XXXX.50888 > 65.55.194.221.https: Flags [.], ack 4377914, win 23884, length 0 18:42:31.280015 IP XXXX.XXXX.XXXX.XXXX.50888 > 65.55.194.221.https: Flags [.], ack 4384144, win 23884, length 0 And yet, if I ping download.windowsupdate.com it seems to resolve to a local (national) Akamai node, just fine: root@some-node:~# ping download.windowsupdate.com PING a26.ms.akamai.net (210.9.88.48) 56(84) bytes of data. 64 bytes from a210-9-88-48.deploy.akamaitechnologies.com (210.9.88.48): icmp_req=1 ttl=59 time=1.02 ms 64 bytes from a210-9-88-48.deploy.akamaitechnologies.com (210.9.88.48): icmp_req=2 ttl=59 time=1.10 ms Why is this? And how can I change that (if possible)? I know that I can manually specify a WSUS source to sync with instead of pick the default MS Update like I currently have... But it seems like I shouldn't have to do this. NOTE: I've haven't confirmed if a WUA speaks with Akamai, just looking at WSUS as all WUAs will use our internal WSUS from now on. We'll be looking to join an IX shortly with the hopes of peering with an Akamai cache and have very fast access to Windows Updates. Before I let this drive my motivations for an IX at all I want to first confirm it's actually possible for WSUS to speak with an Akamai cache. I know this is somewhat networking related, but I feel like it has more to do with WSUS than anything, so someone who knows WSUS better than me will likely be able to figure this out.

    Read the article

  • What exactly is a Deamon ? ( how to run a root command from apache binded script that uses www-data user )?

    - by user224235
    I am trying to run this command from WSGI script service httpd restart The problem is this command can only be run by root and apache uses the www-data user. it has been said the solution is to use a Deamon Process i suppose the idea is to send the command to a file that will be executed by a script that is considered "root" user.. its difficult to understand why they would call this a Deamon Process and try to scare me. Perhaps it should have been called : proxy process when i got the idea that this was a proxy process.. i thought about adding a line to /var/spool/cron/root that way the cron would execute the command for me. but of course this means i have to get the system time and then add 1 second to it and then add it to that line so cron would execute the command for me as root but my script demands an output instantly. so i suppose i need to create a DEAMON PROCESS that works like the cron. in other words it is a bash file that will execute the command in a plain file.. but will this DEAMON PROCESS be running a while command 24/7 every second ? would that not waste resources ? it only needs to activate itself to check for a command to execute when there is a command to be executed. i mean in PHP and other programming languages.. running a while statement when there is nothing to be executed could waste resources of the server.. so why should a deamon process constantly be listening for anything. i only want it to listen and execute when it is needed. i do not need a process that is constantly listening.

    Read the article

  • Mongodb: why is my mongo server using two PID's?

    - by Lucas
    I started my mongo with the following command: [lucas@ecoinstance]~/node/nodetest2$ sudo mongod --dbpath /home/lucas/node/nodetest2/data 2014-06-07T08:46:30.507+0000 [initandlisten] MongoDB starting : pid=6409 port=27017 dbpat h=/home/lucas/node/nodetest2/data 64-bit host=ecoinstance 2014-06-07T08:46:30.508+0000 [initandlisten] db version v2.6.1 2014-06-07T08:46:30.508+0000 [initandlisten] git version: 4b95b086d2374bdcfcdf2249272fb55 2c9c726e8 2014-06-07T08:46:30.508+0000 [initandlisten] build info: Linux build14.nj1.10gen.cc 2.6.3 2-431.3.1.el6.x86_64 #1 SMP Fri Jan 3 21:39:27 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49 2014-06-07T08:46:30.509+0000 [initandlisten] allocator: tcmalloc 2014-06-07T08:46:30.509+0000 [initandlisten] options: { storage: { dbPath: "/home/lucas/n ode/nodetest2/data" } } 2014-06-07T08:46:30.520+0000 [initandlisten] journal dir=/home/lucas/node/nodetest2/data/ journal 2014-06-07T08:46:30.520+0000 [initandlisten] recover : no journal files present, no recov ery needed 2014-06-07T08:46:30.527+0000 [initandlisten] waiting for connections on port 27017 It appears to be working, as I can execute mongo and access the server. However, here are the process running mongo: [lucas@ecoinstance]~/node/testSite$ ps aux | grep mongo root 6540 0.0 0.2 33424 1664 pts/3 S+ 08:52 0:00 sudo mongod --dbpath /ho me/lucas/node/nodetest2/data root 6541 0.6 8.6 522140 52512 pts/3 Sl+ 08:52 0:00 mongod --dbpath /home/lu cas/node/nodetest2/data lucas 6554 0.0 0.1 7836 876 pts/4 S+ 08:52 0:00 grep mongo As you can see, there are two PID's for mongo. Before I ran sudo mongod --dbpath /home/lucas/node/nodetest2/data, there were none (besides the grep of course). How did my command spawn two PID's, and should I be concerned? Any suggestions or tips would be great. Additional Info In addition, I may have other issues that might suggest a cause. I tried running mongo with --fork --logpath /home/lucas..., but it did not work. More information below: [lucas@ecoinstance]~/node/nodetest2$ sudo mongod --dbpath /home/lucas/node/nodetest2/data --fork --logpath /home/lucas/node/nodetest2/data/ about to fork child process, waiting until server is ready for connections. forked process: 6578 ERROR: child process failed, exited with error number 1 [lucas@ecoinstance]~/node/nodetest2$ ls -l data/ total 163852 drwxr-xr-x 2 mongodb nogroup 4096 Jun 7 08:54 journal -rw------- 1 mongodb nogroup 67108864 Jun 7 08:52 local.0 -rw------- 1 mongodb nogroup 16777216 Jun 7 08:52 local.ns -rwxr-xr-x 1 mongodb nogroup 0 Jun 7 08:54 mongod.lock -rw------- 1 mongodb nogroup 67108864 Jun 7 02:08 nodetest1.0 -rw------- 1 mongodb nogroup 16777216 Jun 7 02:08 nodetest1.ns Also, my db path folder is not the original location. It was originally created under the default /var/lib/mongodb/ and moved to my local data folder. This was done after shutting down the server via /etc/init.d/mongod stop. I have a Debian Wheezy server, if it matters.

    Read the article

  • Nagios check for wuauserv on Windows Server 2008+

    - by Mechaflash
    From Windows Server 2008+, wuauserv is no longer a service that's ran all of the time and is instead ran as a scheduled task. I'm not sure of the exact behavior of how the scheduled task is created as it seems the schedule is generated and edited by another service. Prior to this, we setup nagios to just check for the running service to ensure it was accepting updates. My question is, how does one track the proper execution/running of wuauserv service in Windows Server 2008+ to ensure it is accepting updates with nagios?

    Read the article

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