Search Results

Search found 1586 results on 64 pages for 'daniel fischer'.

Page 8/64 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Calling Status Bar notification from method from other class.

    - by Jez Fischer
    Firstly, I am new to both android and Java. I have two classes, my main.class and Note.class. I am calling the notification method from my Note.class in my main.class when i press a button. The issue is with this line from the Note.class : PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); When the method is called it force closes. I believe the problem to be with the "this" in PendingIntent.getActivity(this, 0, notificationIntent, 0);, but I am unsure what to change it to. The notification code works fine if it's in the main class. I would be very grateful for any guidance. Edit: Main class : http://pastebin.com/05Yx0a48 Note.class : package com.adamblanchard.remindme.com.adamblanchard; import com.adamblanchard.remindme.R; import android.app.Activity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Bundle; public class Note extends Activity { public CharSequence note = "not changed"; int HELLO_ID = 1; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setTitle("Remind Me!"); } //Notification Method public void callNotification() { // TODO Auto-generated method stub String ns = Context.NOTIFICATION_SERVICE; final NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns); int icon = R.drawable.launcher; CharSequence tickerText = "Remind Me!"; long when = System.currentTimeMillis(); final Notification notification = new Notification(icon, tickerText, when); notification.flags |= Notification.FLAG_AUTO_CANCEL; final Context context = getApplicationContext(); CharSequence contentTitle = "Remind Me!"; CharSequence contentText = note; Intent notificationIntent = new Intent(context, AndroidNotifications.class); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); mNotificationManager.notify(HELLO_ID, notification); HELLO_ID++; } } Debug Output : Thread [<1 main] (Suspended (exception IllegalStateException)) Note(Activity).getSystemService(String) line: 3536 Note.callNotification() line: 37 remindme$1$1.onClick(DialogInterface, int) line: 72 AlertDialog(AlertController$ButtonHandler).handleMessage(Message) line: 159 AlertController$ButtonHandler(Handler).dispatchMessage(Message) line: 99 Looper.loop() line: 123 ActivityThread.main(String[]) line: 3647 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 507 ZygoteInit$MethodAndArgsCaller.run() line: 839 ZygoteInit.main(String[]) line: 597 NativeStart.main(String[]) line: not available [native method] This is the debug output I get, plus a force close popup on the device. Edit2: Manifest xml: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.adamblanchard.remindme" android:versionCode="3" android:versionName="0.7"> <application android:label="@string/app_name" android:icon="@drawable/ic_launcher72"> <activity android:name=".com.adamblanchard.remindme" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".Note"> <intent-filter> <action android:name="Note" /> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> </activity> </application> <uses-sdk android:minSdkVersion="1"></uses-sdk> </manifest> Stack traces (Are these what you mean?): Thread [<1> main] (Suspended (exception ActivityNotFoundException)) Instrumentation.checkStartActivityResult(int, Object) line: 1404 Instrumentation.execStartActivity(Context, IBinder, IBinder, Activity, Intent, int) line: 1378 remindme(Activity).startActivityForResult(Intent, int) line: 2827 remindme(Activity).startActivity(Intent) line: 2933 remindme$1$1.onClick(DialogInterface, int) line: 82 AlertDialog(AlertController$ButtonHandler).handleMessage(Message) line: 159 AlertController$ButtonHandler(Handler).dispatchMessage(Message) line: 99 Looper.loop() line: 123 ActivityThread.main(String[]) line: 3647 Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method] Method.invoke(Object, Object...) line: 507 ZygoteInit$MethodAndArgsCaller.run() line: 839 ZygoteInit.main(String[]) line: 597 NativeStart.main(String[]) line: not available [native method]

    Read the article

  • Constructor with non-instance variable assistant?

    - by Robert Fischer
    I have a number of classes that look like this: class Foo(val:BasicData) extends Bar(val) { val helper = new Helper(val) val derived1 = helper.getDerived1Value() val derived2 = helper.getDerived2Value() } ...except that I don't want to hold onto an instance of "helper" beyond the end of the constructor. In Java, I'd do something like this: public class Foo { final Derived derived1, derived2; public Foo(BasicData val) { Helper helper = new Helper(val); derived1 = helper.getDerived1Value(); derived2 = helper.getDerived2Value(); } } So how do I do something like that in Scala? I'm aware of creating a helper object of the same name of the class with an apply method: I was hoping for something slightly more succinct.

    Read the article

  • TXT File or Database?

    - by Ruth Rettigo
    Hey folks! What should I use in this case (Apache + PHP)? Database or just a TXT file? My priority #1 is speed. Operations Adding new items Reading items Max. 1 000 records Thank you. Database (MySQL) +----------+-----+ | Name | Age | +----------+-----+ | Joshua | 32 | | Thomas | 21 | | James | 34 | | Daniel | 12 | +----------+-----+ TXT file Joshua 32 Thomas 21 James 34 Daniel 12

    Read the article

  • create parent child array from inline data in php

    - by abhie
    actually i have simple problem but i forget how to solve it.. :D i have data on table with following format 01 Johson 01 Craig 01 Johson 02 Daniel 01 Johson 03 Abbey 02 Dawson 01 Brown 02 Dawson 02 Agust 03 Brick 01 Chev 03 Brick 01 Flinch so i want it to become an array like this 01 Johson => 01 Craig ``````````````02 Daniel ```````````````03 Abey ` etc... how to iterate trough the data and make it array like that... i'm newby in PHP :))

    Read the article

  • WCF Binding Created In Code

    - by Daniel
    Hello I've a must to create wcf service with parameter. I'm following this http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/8f18aed8-8e34-48ea-b8be-6c29ac3b4f41 First this is that I don't know how can I set this custom behavior "MyServiceBehavior" in my Web.config in ASP.NET MVC app that will host it. As far as I know behaviors must be declared in section in wcf.config. How can I add reference there to my behavior class from service assembly? An second thing is that I the following example the create local host, but how I can add headers used in constructor when I use service reference and it will already create instance of web service, right? Regards, Daniel Skowronski

    Read the article

  • android memory management outside heap

    - by Daniel Benedykt
    Hi I am working on an application for android and we since we have lots of graphics, we use a lot of memory. I monitor the memory heap size and its about 3-4 Mb , and peeks of 5Mb when I do something that requires more memory (and then goes back to 3). This is not a big deal, but some other stuff is handled outside the heap memory, like loading of drawables. For example if I run the ddms tool outside eclipse, and go to sysinfo, I see that my app is taking 20Mb on the Droid and 12 on the G1, but heap size are the same in both, because data is the same but images are different. So the questions are: How do I know what is taking the memory outside the heap memory? What other stuff takes memory outside the heap memory? Complex layouts (big tree) ? Animations? Thanks Daniel

    Read the article

  • Delphi: Get MAC of Router

    - by Daniel Marschall
    Hello, I am using Delphi and I want to determinate the physical MAC address of a network device in my network, in this case the Router itself. My code: var idsnmp: tidsnmp; val:string; begin idsnmp := tidsnmp.create; try idsnmp.QuickSend('.1.3.6.1.2.1.4.22.1.2', 'public', '10.0.0.1', val); showmessage(val); finally idsnmp.free; end; end; where 10.0.0.1 is my router. Alas, QuickSend does always send "Connection reset by peer #10054". I tried to modify the MIB-OID and I also tried the IP 127.0.0.1 which connection should never fail. I did not find any useable Tutorials about TIdSNMP at Google. :-( Regards Daniel Marschall

    Read the article

  • CakePHP: 2-level JOIN with one Query

    - by Daniel Magliola
    I have the following models in CakePHP: A Deposit belongs to an Account An Account belongs to a Customer I want to have a list of Deposits, and I need to show the name of the customer (so I have to join through the Customer). I also need to paginate this list. If I set Deposit->recursive = 2, I can get the Customer, however, CakePHP runs one query joining Deposit and Account, and then runs one query per each Deposit, to get the Customer. How can I make it get both models with only one query? I tried this, but it didn't work: $this->paginate = array('joins' => array( array( 'table' => 'customers', 'alias' => 'AccountCustomer', 'type' => 'inner', 'foreignKey' => false, 'conditions' => array('Account.customer_id = AccountCustomer.id') ) )); Any ideas? Thanks! Daniel

    Read the article

  • Exception from HRESULT: 0x800A03EC

    - by Daniel
    Any help is appreciated: I'm developing a C#.Net app in VS2010 that interacts with Excel. The app works correctly on my local machine. Uploading to a remote Windows 2003 server however, breaks the app. Originally, I received the following message Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 After Googling the problem (which suggested a permissions problem) i tried this: Installing Excel 2007 Going into Component Services on the remote server and following the instructions here: http://blog.crowe.co.nz/archive/2006/03/02/589.aspx Now I get this message on the same operation: Exception from HRESULT: 0x800A03EC Google searches seem to be suggesting that this is a version match error. However, both the local machine and the remote server use Excel 2007. Any suggestions would be very welcome. Thanks in advance. -Daniel

    Read the article

  • Visual Studio 2010 Full and ASP.NET MVC 2.0 Template

    - by Daniel
    Hello, I've installed full version (not RC nor Beta) of Visual Studio 2010, a then setup within Web Platform Installer 2.0 announce me that I need to install MVC 2.0, so i did it. When I want to create project "MvcWebApplicationProjectTemplate" in VS I have following message: error: this template attempted to load component assembly 'Microsoft.VisualStudio.Web.Mvc.2.0, Version=10.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. For more information on this problem and how to enable this template, please see documentation on Customizing Project Templates. Any idea how to fix it? Do you think that Web Platform Installer 2.0 might have corrupted this template? Thanks, Daniel

    Read the article

  • WCF - Disabling security in nettcpbinding (c#)

    - by daniel-lacayo
    Hello everyone. I'm trying to make a self hosted WCF app that uses nettcpbinding but works in an environment without a domain. It's just two regular windows pc's, one is the server and the other one will be the client. The problem with this is that when I try to get the client to connect it's rejected because of the security settings. Can you please point me in the right direction as to how I can get this scenario to work? Should I (if possible) disable security? Is there another (hopefully simple) way to accomplish this? Regards, Daniel

    Read the article

  • MySQL to AppEngine

    - by Daniel Naito
    Hi Nick! How are you? I'm from Brazil and study at FATEC (college located in Brazil). I'm trying to learn about AppEngine. Now, I'm trying to load a large database from MySQL to AppEngine to perform some queries, but I don't know how i can do it. I did some testing with CSV files,but is there any way to perform the direct import from MySQL? This database is from Pentaho BI Server (www.pentaho.com). Thank you for your attention. Regards, Daniel Naito

    Read the article

  • Configurable ruby logger setup: Logger.new().level = variable

    - by Daniel
    Hi, I want to change the logging level of an application (ruby). require 'logger' config = { :level => 'Logger::WARN' } log = Logger.new STDOUT log.level = Kernel.const_get config[:level] Well, the irb wasn't happy with that and threw "NameError: wrong constant name Logger::WARN" in my face. Ugh! I was insulted. I could do this in a case/when to solve this, or do log.level = 1, but there must be a more elegant way! Does anyone have any ideas? -daniel

    Read the article

  • Master / Detail datagridview with relation from type string in C#

    - by Daniel
    Hello, I want to show a master / detail relationship using two datagridviews and DataRelation in C#. The relation between the master and the detail table is an ID from type string (and there is no chance to change the ID to type integer). It seems like the DataGridView is not able to update the detail view when changing the row in the master table. Does anybody know if it is possible to achieve a master / detail view using a string ID and if yes, how? Or do I have to use an external DataGrid from another company? Thanks for any help Daniel

    Read the article

  • Why did this work? ( php dot notation )

    - by Daniel
    Hi, I was writing some php code after a long sint doing ruby and I accidently wrote this: [root@ip-10-160-47-98 test]# cat run.php <?php class MyTest { public function run() { var_dump(this.test); } } $object = new MyTest(); $object->run(); [root@ip-10-160-47-98 test]# php run.php string(8) "thistest" [root@ip-10-160-47-98 test]# Now, this.test should have been $this-test, but the compiler was actually happy to let this run. Does anyone know how (this.test) got converted into a string "thistest"? Compiled and run on php 5.3.2 amazon instance ami-e32273a6 (CentOS 5.4) -daniel

    Read the article

  • Surgical slave reads for Ruby on Rails, mulitple databases.

    - by Daniel
    Greetings, I'm currently working on a multiple database rails application. I want to off load the SELECT queries on to the slave databases for only SOME of the databases or specific models. The issue is that in places, we swap out the current database connection and put in a different one for a short time; to load fixtures or to handle sharding. Does anyone have any recommendations on a ruby gem that 1. will split select/(sql writes) with a considerable amount of control. We want to handle just some models and we are looking for a neat surgical fix. 2. does not monkey around with activerecord. 3. is still being maintained. TIA -daniel

    Read the article

  • Can I get a dump of all my databases *except one* using mysqldump?

    - by Daniel Magliola
    I'm currently using mySQLdump to backup my dev machine and servers. There is one project I just started, however, that has a HUUUUUGE database that I don't really need backed up, and i'll be a big problem to add it to the rest of the backup cycle. I'm currently doing this: "c:\Program Files\mysql\MySQL Server 5.1\bin\mysqldump" -u root -pxxxxxx --all-databases g:\backups\MySQL\mysqlbackup.sql Is it possible to somehow specify "except this database(s)"? I wouldn't like to have to specify the list of DBs manually, since that would mean that I'd have to remember updating my backup batch file every time I create a new DB, and I know that's not gonna happen. EDIT: As you probably guessed from my command line above, i'm doing this on Windows, so I can't do any kind of fancy bash stuff, only wimpy .bat things. Alternatively, if you have other ideas to solve this same issue, they are more than welcome, of course! Thanks Daniel

    Read the article

  • How can I split a PHP form into two sections, before submission to a database?

    - by Daniel Smith
    Hi guys, I have set up a PHP form for a competition, for users to enter and all information to be stored in a database. I used the following NetTut+ tutorial to do so: http://tr.im/SwAd. I've got the form submitting to the database as required, but with so many additional questions being asked, I would like to split the form into two separate sections. Obviously the first page would say continue to the next step before the second step allowing for the form to be submitted to the database. The content that the user sees should be split, but should all be a part of the same form. Step 1 Step 2 before submission. Would anyone know of or recommend any methods to do this? I'm a beginner so please be nice. :) Cheers, Daniel

    Read the article

  • From interpeted to native code: "dynamic" languages compiler support

    - by Daniel
    First, I am aware that dynamic languages is a term used mainly by a vendor; I am using it just to have a container word to include languages like Perl (a favorite of mine), Python, Tcl, Ruby, PHP and so on. They are interpreted but I am interested here to refer to languages featuring strong capability to support the programmer efficiency and the support for typical constructs of modern interpreted languages My question is: there are dynamic languages can be compiled efficiently in native executable code - typically for Windows platforms? Which ones? Maybe using some third part ad-hoc tools? I am not talking about huge executables carrying with them a full interpreter or some similar tricks nor some smart module able to include its own dependances or some required modules, but a honest, straight, standard, solid executable code. If not, there is some technical reason inhibiting the availability of such a best-of-both-world feature? Thanks! Daniel

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >