Daily Archives

Articles indexed Wednesday March 31 2010

Page 12/124 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • User management API

    - by Akshey
    Hi, I am developing an application suite where users will need to connect to a server and depending on their account type they will be given some services. The server will run Linux. Can you please suggest me some user management API which I can use to develop the server program? By user management I mean user authentication and other related functionalities. I prefer to work in C++ or python, but any other language should not be a problem. Please note that this application suite is not web based. Due to security issues, I do not want to give each user a separate account on the linux server. Thanks, Akshey

    Read the article

  • How do I properly unit test a Django session?

    - by thebossman
    The behavior of Django sessions changes between "standard" views code and test code, making it unclear how test code is written for sessions. Googling this yields two relevant discussions about this issue: Easier manipulation of sessions by test client test.Client.session.save() raises error for anonymous users I'm confused because both tickets have different ways of dealing with this problem and they were both Accepted. I assume this means they were patched and the behavior is now different. I also don't know to which versions these patches would pertain. If I'm writing a unit test in Django 1.0, how would I set up my session store for sessions to work as they do in the browser?

    Read the article

  • Could you help me understand how to create a C# api by setting the scope of methods, objects, proper

    - by highone
    The answer to this SO question says that you can create an api by exposing methods, objects and .ect by setting their scope to public. http://stackoverflow.com/questions/630971/how-to-start-creating-an-application-api-in-net One of the main things I want to expose is the text of a textbox. Would the best way to do this be to create a public static Text property that is updated by the textbox's textchanged event? Also what would a developer do in order to interact with this text property? Would they add a reference to the program .exe in their program? Please help, I'm quite clueless here. Also was not sure how to word this question, feel free it edit if it is unclear.

    Read the article

  • Legal to decompile an SWF licensed under Apache 2.0

    - by PeterG
    Is it legal to decompile an SWF that is licensed under Apache 2.0 with no additional terms? I'm also planning on modifying and using for commercial purposes. My understanding is that Apache License 2.0 allows for modification of source and object, but I'm not sure if I can convert from object to source. Thanks.

    Read the article

  • Need to Release UIWebView Delegate?

    - by Chris
    I have a UIWebView named wView. I want to use webViewDidFinishLoad: in my class, so I am setting the class as the delegate for wView by using this line: wView.delegate = self; Everything loads properly, but when I close the UIWebView, the App crashes. If I comment out the wView.delegate = self, it works and does not crash, but then I can't use webViewDidFinishLoad: - any ideas? Do I need to release something?

    Read the article

  • Making a app show inside a GUI in Java

    - by José
    Hello. I have one problem I've been dealing with for this week. You see, I'm new to Java, so that's probably it... Anyways, I've started a project out of pure curiosity. I had it done in Java, but in plain CMD-style, which is not very pretty. It calls one of my ten programs, chosen by the user using "Case". Eg.: If you type 1, it will go to program 1. After you finish it, it goes back to selection until the user press 0. After that, I've been trying to make a GUI for it. I've been able to create the selector alone and make it respond to the numbers chosen. If you press 1 and click ok, it will tell you you've chosen program 1. I, however, have not been able to make it run the program. I've been trying to make the program show up in a jPanel, part of the main GUI. I failed miserably. The program runs in separate but I can't make them run together like the CMD one. The apps were made in Eclipse SDK 3.5.2 The GUIs were made in Netbeans IDE 6.8 Here's the code for the GUI only (the prints are in PT-BR, my native language): Main program: /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * ProgramasGUI.java * * Created on 31/01/2010, 22:56:19 */ package Main; import Main.Prog1; /** * * @author Zeh® */ public class ProgramasGUI extends javax.swing.JFrame { /** Creates new form ProgramasGUI */ public ProgramasGUI() { initComponents(); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { selecao = new javax.swing.JTextField(); mostrador = new javax.swing.JLabel(); selecionar = new javax.swing.JButton(); mostrador1 = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); selecao.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { selecaoActionPerformed(evt); } }); mostrador.setText("Qual o programa desejado?"); selecionar.setText("OK"); selecionar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { selecionarActionPerformed(evt); } }); mostrador1.setText("Saiba aqui o Programa escolhido!"); jPanel1.addComponentListener(new java.awt.event.ComponentAdapter() { public void componentShown(java.awt.event.ComponentEvent evt) { jPanel1ComponentShown(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 100, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 100, Short.MAX_VALUE) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(selecao, javax.swing.GroupLayout.PREFERRED_SIZE, 203, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(selecionar, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(mostrador1, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(mostrador, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addGap(162, 162, 162) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(39, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(30, 30, 30) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(selecao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(mostrador, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(selecionar) .addComponent(mostrador1)) .addContainerGap()) ); pack(); }// </editor-fold> private void selecaoActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: } private void selecionarActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: int programa = (int)((Double.parseDouble(selecao.getText()))); switch (programa) { case 1: mostrador1.setText("O programa " + programa + " foi escolhido!" ); break; case 2: mostrador1.setText("O programa " + programa + " foi escolhido!" ); break; case 3: mostrador1.setText("O programa " + programa + " foi escolhido!" ); break; case 4: mostrador1.setText("O programa " + programa + " foi escolhido!" ); break; case 5: mostrador1.setText("O programa " + programa + " foi escolhido!" ); break; case 6: mostrador1.setText("O programa " + programa + " foi escolhido!" ); break; case 7: mostrador1.setText("O programa " + programa + " foi escolhido!" ); break; case 8: mostrador1.setText("O programa " + programa + " foi escolhido!" ); break; case 9: mostrador1.setText("O programa " + programa + " foi escolhido!" ); break; case 10: mostrador1.setText("O programa " + programa + " foi escolhido!" ); break;} } private void jPanel1ComponentShown(java.awt.event.ComponentEvent evt) { int programa = (int)((Double.parseDouble(selecao.getText()))); switch (programa) { case 1: addNotify(Prog1.); break;} } /** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new ProgramasGUI().setVisible(true); } }); } // Variables declaration - do not modify private javax.swing.JPanel jPanel1; private javax.swing.JLabel mostrador; private javax.swing.JLabel mostrador1; private javax.swing.JTextField selecao; private javax.swing.JButton selecionar; // End of variables declaration } And here's the sub-program: /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * Prog1.java * * Created on 02/02/2010, 23:57:59 */ package Main; /** * * @author Zeh® */ public class Prog1 extends javax.swing.JPanel { /** Creates new form Prog1 */ public Prog1() { initComponents(); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel1 = new javax.swing.JLabel(); numesc = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); campo = new javax.swing.JTextField(); jLabel1.setText("Saiba aqui o Antecessor!"); numesc.setText("O número escolhido é: X"); jLabel3.setText("Saiba aqui o Sucessor!"); jLabel4.setText("Insira um número para saber seu Antecessor e Sucessor!"); jButton1.setText("Calcular!"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); campo.setText("Insira seu número"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(16, 16, 16) .addComponent(jButton1)) .addComponent(campo, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jLabel3)) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(numesc, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE))) .addComponent(jLabel4)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel4) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(campo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(numesc) .addGap(11, 11, 11) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(jButton1)) .addContainerGap(24, Short.MAX_VALUE)) ); }// </editor-fold> private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { int num = (int)((Double.parseDouble(campo.getText()))); numesc.setText("O número escolhido é: " + num); int x = num-1; jLabel1.setText ("O antecessor é: " + x); int y = num+1; jLabel3.setText ("O sucessor é: " + y); } // Variables declaration - do not modify private javax.swing.JTextField campo; private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel numesc; // End of variables declaration } Any help would be very appreciated. If I, for some reason, made a mistake typing and/or setting the layout of this post incorrectly, please accept my apologies.

    Read the article

  • AS3 change lineStyle of existing line

    - by Ozzy
    Hi all im drawing a line from 0,0 to 100,100 im using this to modify the linestyle: draw_line.graphics.lineStyle(1, 0xFF0000); That line is now of 1 thickness. Is there anyway i can change the thickness of the line to say 10, but without redrawing the line?

    Read the article

  • Can't change pivot table's Access data source - bug in Excel 2000 SP3?

    - by Ron West
    I have a set of Excel 2000 SP3 worksheets that have Pivot Tables that get data from an Access 2000 SP3 database created by a contractor who left our company. Unfortunately, he did all his work on his private area on the company (Novell) network and now that he has left us, the drive spec has been deleted and is invalid. We were able to get the database files restored to our network area by our IT Service Desk people, but we now have to re-link everything to point to our group area instead of the now-nonexistent private area. If I follow the advice given elsewhere on this site (open wizard, click 'Back' to get to 'Step 2 of 3', click 'Get Data...' I get a message that the old filespec is an invalid path and I need to check that the path name is invalid and that I am connected to the server on which the file resides. I then click on OK and get a Login dialog with a 'Database...' button on the right. I click this and get a 'Select Database' dialog which allows me to choose the appropriate database in its correct new location. I then click OK, which takes me back to the 'Login' screen. I can confirm that it has accepted my new location by clicking on 'Database...' as before and the NEW location is still shown. So far so good - but if I then click on OK I get two unhelpful messages - first I get one saying that Excel 'Could not use '|'; file already in use.' - although no other files are in use. Clicking on OK takes me back to the 'Login' dialog. Clicking OK again gives me the same message as before telling me that the OLD filespec is invalid (as if I hadn't changed anything) - but clicking on the 'Database...' button shows that the correct (NEW) database location is still selected. Can anyone tell me a way of using VBA to change the link information without having to spend hours fighting the PivotTable Wizard - preferably similar to this way you update an Access Tabledef:- db.TableDefs(strLinkName).Connect = strNewLink db.TableDefs(strLinkName).RefreshLink Thanks!

    Read the article

  • Android: handle unexpected internet disconnect while downloading data

    - by M.A. Cape
    Hi, I have here a function that downloads data from a remote server to file. I am still not confident with my code. My question is, what if while reading the stream and saving the data to a file and suddenly I was disconnected in the internet, will these catch exceptions below can really catch that kind of incident? If not, can you suggest how to handle this kind of incident? Note: I call this function in a thread so that the UI won't be blocked. public static boolean getFromRemote(String link, String fileName, Context context){ boolean dataReceived = false; ConnectivityManager connec = (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE); if (connec.getNetworkInfo(0).isConnected() || connec.getNetworkInfo(1).isConnected()){ try { HttpClient httpClient = new DefaultHttpClient(); HttpGet httpGet = new HttpGet(link); HttpParams params = httpClient.getParams(); HttpConnectionParams.setConnectionTimeout(params, 30000); HttpConnectionParams.setSoTimeout(params, 30000); HttpResponse response; response = httpClient.execute(httpGet); int statusCode = response.getStatusLine().getStatusCode(); if (statusCode == 200){ HttpEntity entity = response.getEntity(); InputStream in = null; OutputStream output = null; try{ in = entity.getContent(); String secondLevelCacheDir = context.getCacheDir() + fileName; File imageFile = new File(secondLevelCacheDir); output= new FileOutputStream(imageFile); IOUtilities.copy(in, output); output.flush(); } catch (IOException e) { Log.e("SAVING", "Could not load xml", e); } finally { IOUtilities.closeStream(in); IOUtilities.closeStream(output); dataReceived = true; } } }catch (SocketTimeoutException e){ //Handle not connecting to client !!!! Log.d("SocketTimeoutException Thrown", e.toString()); dataReceived = false; } catch (ClientProtocolException e) { //Handle not connecting to client !!!! Log.d("ClientProtocolException Thrown", e.toString()); dataReceived = false; }catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); dataReceived = false; Log.d("MalformedURLException Thrown", e.toString()); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); dataReceived = false; Log.d("IOException Thrown", e.toString()); } } return dataReceived; }

    Read the article

  • Most used .NET namespace

    - by Michael Prewecki
    What is your most commonly used namespace in .NET. I know it will vary greatly based upon the types of projects you develop but the stack overflow audience should provide a fairly decent sample set for the types of .NET projects being developed. I'm simply interest in the name of the namespace (one namespace per answer and no one person should have more than one answer, if someone else has the same answer as you then just upvote their answer). Try to be as specific as possible (so answering System, isn't helpful). I'm after this information to help new developers focus their attention on the most common .NET namespaces...there are after all thousands of them! To start off mine is almost certainly System.Collections.Generic, I use lists of things everywhere.

    Read the article

  • SeaMonkey

    The SeaMonkey project takes over the reins on the continued development of Mozilla Application Suite

    Read the article

  • Drupal and Passenger on the same virtual host

    - by aussiegeek
    I have drupal installed in the root of the site, with two Rails sites hosted with Passenger under /connect and /administration. My problem is while the roots of these rails apps work correctly, any sub page gets handle by the Drupal Rewrite ruleset I'm not sure how to make this work

    Read the article

  • yum / rpm / make | When to use which one

    - by Saif Bechan
    I am new to Linux and am running CentOs. When I want to update or install certain software I came across three ways. Sometimes it's: yum install program rpm -i program.rpm wget program.tar.gz unpack ./configure make make install That last one is a real pain, esp when you come from windows where a program install is usually one click and then a nice guide. Now can someone please explain to me: Why are there so many different ways to do this? Which one do you recommend to use and why? Are there any other ways for installing programs?

    Read the article

  • How to acquire still webcam image

    - by Silv3rSurf
    I need some help deciding what to use to acquire an image from a webcam. I want to acquire a single image. I know you can typically acquire a still image at a higher resolution than a single video frame. Currently, I am using MATLAB's image acquisition toolbox.. which apparently only supports obtaining frames in video mode(so lower resolution). Which other libraries do you recommend? Has anyone else encountered this problem?

    Read the article

  • grails clean having issues

    - by hvgotcodes
    Im running grails 1.2 on win7. when i try to do grails clean it fails to remove some jars in my acegi plugin. after that failure, it complains about not finding the plugin descriptor. I am forced to remove all plugins from the disk manually and then run the app again to download them again. the particular jar in acegi is ant-contrib-xx.jar. has anyone seen this? as a further note, if i just delete the acegi directory after the initial failure it fails on a jar in another plugin. I dont know if Im having some sort of windows filesystem issue (I am coming from linux, forced to use win7 because intellij sucks on linux), or intellij is doing something, or what...

    Read the article

  • Can a .csv file be used as a data source in Visual Studio 2008 (C#)?

    - by Kevin
    I'm pretty new to C# and Visual Studio. I'm writing a small program that will read a .csv file and then write the records read to a MS SQL database table. I can manually parse the .csv file, but I was wondering if it is possible to somehow "describe" the .csv file to Visual Studio so that I can use it as a data source? I should mention that the first two lines in the .csv file contain header information and the following lines are the actual comma-delimited data.

    Read the article

  • FireLog: proper installation...

    - by kent
    I have installed the firewiresdk26 on my dev mac... and in the Tools/ directory is FireLog. I have run the FireLog 2.0.0.pkg installer on my dev mac, but the payload it deploys is installed in my /System/Library tree, as opposed to my /Developer/SDKs tree. so when I try to include the header iokit/firewire/FireLog.h it does not get found. am I missing something? or doing something wrong? or is this an error in the installer (either FW26 or FireLog installers?) I realize that the FireLog installer is intended to be run on the machine to be debugged remotely and thus it makes sense that the framework is placed in the /System/Library path, however none of the installers gets it into my developer path... I guess I just have to move it over there by hand, but before I do that I wanted to see if I'm just overlooking something silly and need to read the docs with more concentration or something... anyone run into this before? [thx]

    Read the article

  • Where is pure virtual function located in C++?

    - by skydoor
    Which virtual table will be pure virtual function located? In the base class or derived class? For example, what does the virtual table look like in each class? class Base { virtual void f() =0; virtual void g(); } class Derived: public Base{ virtual void f(); virtual void g(); }

    Read the article

  • How to kill an Android activity when leaving it so that it cannot be accessed from the back button?

    - by johnrock
    In an given Android activity, I would like to start a new activity for the user at some point. Once they leave the first activity and arrive at the second, the first activity is stale and I want to remove it completely so it can not be accessed again from the back button. How is the best way to accomplish this? How do I kill or destroy this activity immediately after the user has launched the new activity?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >