Search Results

Search found 8247 results on 330 pages for 'smart phone'.

Page 212/330 | < Previous Page | 208 209 210 211 212 213 214 215 216 217 218 219  | Next Page >

  • Making self-logging modules with Log::Log4perl

    - by Oesor
    Is there a way to use Log::Log4perl to make a smart self-logging module that logs its operations to a file even in the absence of the calling script not initializing Log4perl? As far as I can tell from the documentation, the only way to use Log4perl is to initialize it in the running script from a configuration, then modules implementing Log4perl calls log themselves based on the caller's Log4perl config. Instead, I'd like the modules to provide a default initialization config for Log4perl. This would provide the default file appender for the module's category. Then, I could override this behavior by initing Log4perl in the caller with a different config if needed, and everything would hopefully just work. Is this sort of defensive logging behavior possible or am I going to need to rely on initing Log4perl in every .pl script that calls the module I want logged?

    Read the article

  • Using git to sync existing file collection?

    - by chrish
    I've got a collection of files that formerly lived in a Subversion repo; on my new server I've imported them into a git repo so I could start getting more experience with that. On several other machines, I've got mostly up-to-date copies of the existing svn repo files. Is there any way to sync to the new git repo, but use these existing files so I don't have to re-transfer all of the data? Is git smart enough that if I do a fetch? or checkout? that it'll notice the files are identical and not re-transfer them?

    Read the article

  • ASP.NET Dynamic Data field value disappears in the browser.

    - by ProfK
    I have an ASP.NET Dynamic Data web application, with an entity called ActivationResource. One of the properties of this is a CellPhone field. Now, whenever I open a List or Details view of one of these entities, the cell phone number displays for a moment then disappears. Anyone have any ideas as to the cause of this mysterious behavior?

    Read the article

  • Why is 'using' improving C# performances

    - by Wernight
    It seems that in most cases the C# compiler could call Dispose() automatically. Like most cases of the using pattern look like: public void SomeMethod() { ... using (var foo = new Foo()) { ... } // Foo isn't use after here (obviously). ... } Since foo isn't used (that's a very simple detection) and since its not provided as argument to another method (that's a supposition that applies to many use cases and can be extended), the compiler could automatically call Dispose() without the developper requiring to do it. This means that in most cases the using is pretty useless if the compiler does some smart job. IDisposable seem low level enough to me to be taken in account by a compiler. Now why isn't this done? Wouldn't that improve the performances (if the developpers are... dirty).

    Read the article

  • Accessing Google Account Id /username via Android (pre 2.0)

    - by KawBoy
    How do you access the user's Google Account Id / username in code (pre-2.0)? I am building an application that will call a web service to store data and I want to identify the identity of the person sumitting the data. If no user identity information available (pre 2.0) how about the ability to access phone identity (pre 2.0). Thanks in advance.

    Read the article

  • Why are developers proud to say our application is XXX lines of code? [closed]

    - by mbcrump
    I admit, I used to do it. I was proud to tell a fellow developer my application is 10K+ lines of code. I thought it was a "Look at me, I'm smart" statement. Time passed and I realized that a experienced developer would be constantly refactoring all of his code. Not only for the sake of remembering what it was doing, but because he realizes he is smarter today than he was yesterday. No longer was it cool to have multiple nested if statements or completely ignoring generics/lambdas. So, whats your take on this? Do you do it and why?

    Read the article

  • Should I uniform different API calls to a single format before caching?

    - by bluedaniel
    The problem is that I am recreating the social media widget/icons on http://about.me/bluedaniel (thats me). Anyhow there can be up to 6 or 7 different API calls on the page and obviously I am caching them, at the moment with Memcached. The question is, as they arrive in various formats and sizes (fb-json, linkedin-xml, wordpress-rss etc), should I universally format/convert them before storing it in the cache. At present I have recreated the html widget and then stored that, but I worry about saving huge blocks of html in the cache as it doesn't seem that smart.

    Read the article

  • Movable Type: Specify only one keyword from MTEntryKeywords

    - by kohei
    Hi, I have several keywords (1~3 words) stored in <MTEntryKeywords> field separated by commas. I want to take out the first keyword from MTEntryKeywords. Example 1: In the Keywords field I have entered: gadgets,phone,apple, Want to display: gadgets Example 2: In the Keywords field I have entered: food,coffee,apple, Want to display: food Any ideas?

    Read the article

  • Why is the 'this' keyword not a reference type in C++ [closed]

    - by Dave Tapley
    Possible Duplicates: Why ‘this’ is a pointer and not a reference? SAFE Pointer to a pointer (well reference to a reference) in C# The this keyword in C++ gets a pointer to the object I currently am. My question is why is the type of this a pointer type and not a reference type. Are there any conditions under which the this keyword would be NULL? My immediate thought would be in a static function, but Visual C++ at least is smart enough to spot this and report static member functions do not have 'this' pointers. Is this in the standard?

    Read the article

  • Removing items from lists and all references to them.

    - by LiamV
    I'm facing a situation where I have dependent objects and I would like to be able to remove an object and all references to it. Say I have an object structure like the code below, with a Branch type which references two Nodes. public class Node { // Has Some Data! } public class Branch { // Contains references to Nodes public Node NodeA public Node NodeB } public class Graph { public List<Node> Nodes; public List<Branch> Branches; } If I remove a Node from the Nodes list in the Graph class, it is still possible that one or more Branch objects still contains a reference to the removed Node, thus retaining it in memory, whereas really what I would quite like would be to set any references to the removed Node to null and let the garbage collection kick in. Other than enumerating through each Branch and checking each Node reference sequentially, are there any smart ideas on how I remove references to the Node in each Branch instance AND indeed any other class which reference the removed Node?

    Read the article

  • .NET Compact Framework Connection String encryption/securing

    - by Crazydog
    I'm writing an application in C# for a smart device running Windows Mobile 6.1. It's pretty basic. Just querying a database and getting results. Nothing too fancy. This program is only going to be deployed internally, but we still want to be secure with our SQL connection info. What's the best way I should go about encrypting/securing my connection string in the program? I've seen examples for .NET programs using AppSettings, but I'm not seeing a Setting stab in my Solution properties. This is my first time developing an application in C#/Visual Studio 2008, so there might be some kind of setting I'm missing. Thanks for the help.

    Read the article

  • Interdependent android projects

    - by user347576
    Hello all, I was wondering if its possible to reference one android project from another android project. I have two projects, test1 and test2. I have added test2 in the project properties of test1 under the projects tab. Unfortunately it keeps throwing a NoClassDefFoundError. Also, would the second android project (test2) be installed as a separate apk on the phone or would it be part of the encapsulating android project (test1) ? Thanks very much!

    Read the article

  • Can I access the keychain on the iPhone with MonoTouch?

    - by TrolleFar
    Hello, I have recently started to develop applications for iPhone with MonoTouch and have to store user names and passwords on the phone. I want to use the keychain for this but can't find anything in the MonoTouch documentation about it. Is it possible to use it directly with MonoTouch or will I have to write some C++/C/Objective-C code that uses the keychain and export it to MonoTouch?

    Read the article

  • Is this application possible with the twitter api?

    - by salva84
    I have to make an application where a "sender" can send a message to a group of people and to a location. So when a member of the group reach this place (using location position with the cell phone), he receives all the messages for this location. I have thought to make the application using the twitter API, but I'm not really sure if that functionality is possible. Thank you!

    Read the article

  • Rails populate edit form for non-column attributes

    - by Rabbott
    I have the following form: <% form_for(@account, :url => admin_accounts_path) do |f| %> <%= f.error_messages %> <%= render :partial => 'form', :locals => {:f => f} %> <h2>Account Details</h2> <% f.fields_for :customer do |customer_fields| %> <p> <%= customer_fields.label :company %><br /> <%= customer_fields.text_field :company %> </p> <p> <%= customer_fields.label :first_name %><br /> <%= customer_fields.text_field :first_name %> </p> <p> <%= customer_fields.label :last_name %><br /> <%= customer_fields.text_field :last_name %> </p> <p> <%= customer_fields.label :phone %><br /> <%= customer_fields.text_field :phone %> </p> <% end %> <p> <%= f.submit 'Create' %> </p> <% end %> As well as attr_accessor :customer And I have a before_create method for the account model which does not store the customer_fields, but instead uses them to submit data to an API.. The only thing I store are in the form partial.. The problem I'm running into is that when a validation error gets thrown, the page renders the new action (expected) but none of the non-column attributes within the Account Detail form will show? Any ideas as to how I can change this code around a bit to make this work me?? This same solution may be the help I need for the edit form, I have a getter for the data which it asks the API for, but without place a :value = "asdf" within each text box, it doesn't populate the fields either..

    Read the article

  • Get Windows mobile sound level, especially silent mode

    - by Sam
    In Windows Mobile (5,6) you can have different sound volume settings. The volume itself is easy, but how do I differ between the two silent settings? There is one volume setting "vibration only" and one "no sound, no vibration at all". Since my program is using vibration, I'd like to know if windows mobile is set to "no vibration at all", so I don't annoy the user when he wants his phone to be absolutely silent.

    Read the article

  • SQL Server Reporting Services Format Hours as Hours:Minutes

    - by Frank Schmitt
    I'm writing reports on SQL Server Reporting Server that have a number of hours grouped by, say, user, and a total calculated based on the sum of the values. Currently my query runs a stored proc that returns the hours as in HH:MM format, rather than decimal hours, as our users find that more intuitive. The problem occurs when I try and add up the column using an SSRS expression, because the SUM function isn't smart enough to handle adding up times in this format. Is there any way to: Display a time interval (in minutes or hours) in HH:MM format while having it calculated in decimal form? Or split up and calculate the total of the HH:MM text values to arrive at a total as an expression? I'd like to avoid having to write/run a second query just to get the total.

    Read the article

  • Overllaping view elements

    - by rantravee
    Hi, Here's the problem I'm facing : I've got a custom slider that controlls the volume and a label "volume" that I combine together in a liniar Layout to obtain a volume control setting. In the emulator and on a G1 phone these look pretty ok , however , when put on a Xperia mini the label and the slider overlap . What should I do obtain a decent view independent of the device the application runs ?

    Read the article

  • opening and viewing a file in php

    - by Christian Burgos
    how do i open/view for editing an uploaded file in php? i have tried this but it doesn't open the file. $my_file = 'file.txt'; $handle = fopen($my_file, 'r'); $data = fread($handle,filesize($my_file)); i've also tried this but it wont work. $my_file = 'file.txt'; $handle = fopen($my_file, 'w') or die('Cannot open file: '.$my_file); $data = 'This is the data'; fwrite($handle, $data); what i have in mind is like when you want to view an uploaded resume,documents or any other ms office files like .docx,.xls,.pptx and be able to edit them, save and close the said file. edit: latest tried code... <?php // Connects to your Database include "configdb.php"; //Retrieves data from MySQL $data = mysql_query("SELECT * FROM employees") or die(mysql_error()); //Puts it into an array while($info = mysql_fetch_array( $data )) { //Outputs the image and other data //Echo "<img src=localhost/uploadfile/images".$info['photo'] ."> <br>"; Echo "<b>Name:</b> ".$info['name'] . "<br> "; Echo "<b>Email:</b> ".$info['email'] . " <br>"; Echo "<b>Phone:</b> ".$info['phone'] . " <hr>"; //$file=fopen("uploadfile/images/".$info['photo'],"r+"); $file=fopen("Applications/XAMPP/xamppfiles/htdocs/uploadfile/images/file.odt","r") or exit("unable to open file");; } ?> i am getting the error: Warning: fopen(Applications/XAMPP/xamppfiles/htdocs/uploadfile/images/file.odt): failed to open stream: No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/uploadfile/view.php on line 17 unable to open file the file is in that folder, i don't know it wont find it.

    Read the article

  • Playing .swf file in MediaPlayer?

    - by Omar
    I'm having some issues in playing .swf files on my application. On my PC, using Media Player Classic, they work normally, but on my phone they dont, all I hear is weird sounds.. the code I use to play: mediaplayer = MediaPlayer.create(getBaseContext(), Uri.parse(CurrentAyaSoundPath)); Can anyone tell me why I cant play .swf files normally? Is there another way to play them? Edit1: the .swf are sound only.. no video

    Read the article

< Previous Page | 208 209 210 211 212 213 214 215 216 217 218 219  | Next Page >