|
This is not the place for messages like this; please read the Forum Guidelines[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Joshhua123 wrote: fastest responces
Perhaps you are expecting too much from people that volunteer their time.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
... and today's lesson kids is about how not to cross-post a question.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
If it helps anyone, the problem was that the texture size wasn't a power of two, which caused them problem, support for textures which aren't n^2 in openGL 2.1
The used one was openGL 1.1
|
|
|
|
|
The code below returns the least frequent AGE or rarest age in the name/age map below;
{Alyssa=22, Char=25, Dan=25, Jeff=20, Kasey=20, Kim=20, Mogran=25, Ryan=25, Stef=22}
which is stef=22 as it shows up twice where others show up 3 times in the map collection. I cannot understand the code starting at line 11 on. I'd appreciate any help.
public static int rarestAge(Map<string, integer=""> map) {
if (map == null || map.isEmpty()) {
throw new IllegalArgumentException();
}
Map<integer, integer=""> map2 = new TreeMap<integer, integer="">();
for (String name : map.keySet()) {
int age = map.get(name);
if (map2.containsKey(age)) {
map2.put(age, map2.get(age) + 1);
} else {
map2.put(age, 1);
}
}
int count3 = map.size() + 1;
int rarest = -1;
for (int age : map2.keySet()) {
int count = map2.get(age);
// line 11...I cannot understand the code below;
if (count < count3) {
count3 = count;
rarest = age;
}
}
return rarest;
}
|
|
|
|
|
It loops thru all the keys of the map (i.e. the ages). For each value, it asks: how often was that age found (int count = map2.get(age);)? If it was found less often than the current minimum (count3), the new value is the current minimum.
|
|
|
|
|
|
How I done the Project code?
eye roll scan project in android
|
|
|
|
|
This is no valid computer project.
It's hard enough for men to figure when the girlfriend/wife is rolling eyes.
I don't think a machine is capable to do this.
|
|
|
|
|
+5
|
|
|
|
|
|
|
I devloped one java web application for student placement agency.When particular student fill the registration form in the aplication the aplication would be able to send email of confirmation to respective student account.
I am not having email sever.can there is any option to do this functionality and how to do this??
|
|
|
|
|
|
The JavaMail API provides a platform-independent and protocol-independent framework to build mail and messaging applications. The JavaMail API is available as an optional package for use with Java SE platform and is also included in the Java EE platform.
Links:http://www.oracle.com/technetwork/java/javamail/index.html
|
|
|
|
|
|
I want to experience practical problem of threads.
suggest something..
Atul Agraawal
|
|
|
|
|
Make a swing gui program that copies a big file in background with a progressbar on the UI. Make it cancelable with a cancel button.
EDIT: This task might sound silly but I bet a lot of coders are unable to write it correctly. Complete this task and post the source as an answer to this challange, I will check whether you done well or not.
modified 26-Aug-12 11:47am.
|
|
|
|
|
Study this tutorial[^] and try to create a sample based on what you learn.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
How can i create a mobile app to read and scan barcode from Android mobile camera and show the product type. The main issue here is how to focus on the barcode lines and capture their density.
Sahil Mahajan(eMM jAY)
|
|
|
|
|
by developing the project.
Serious, do some search on google, check some library projects and create an idea on how to achieve your goal.
We can't develop a raw idea for you - unless you pay us well.
|
|
|
|
|
I have developed code for the project. but the problem i am facing is with how to focus the camera on barcode lines.
|
|
|
|
|
|
I tried to create and androip app where a user inputs a medicine, qty and hours(per day). After pressing save, the information will be stored at a file and an alarm should be created to trigger every hour (user spicified/hours). The application always stops and there seems to be a lot of error.
Here is how I create it:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_medicinereminder);
MedName = (EditText) findViewById(R.id.MedName);
Qty = (EditText) findViewById(R.id.MedQty);
NoOfHours = (EditText) findViewById(R.id.MedHours);
noh = Integer.parseInt((NoOfHours.getText()).toString());
Button SaveRem = (Button) findViewById(R.id.createRem);
SaveRem.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
try
{
String filePath = getFilesDir().getPath().toString() + "/MedRem.txt";
File myFile = new File(filePath);
myFile.createNewFile();
FileOutputStream fOut = new FileOutputStream(myFile);
OutputStreamWriter myOutWriter = new OutputStreamWriter(fOut);
myOutWriter.append(MedName.getText() + "\n");
myOutWriter.append(Qty.getText() + "\n");
myOutWriter.append(NoOfHours.getText() + "\n");
myOutWriter.close();
fOut.close();
createAlarm(noh);
}
catch (Exception e)
{
Toast.makeText(getBaseContext(), e.getMessage(),
Toast.LENGTH_SHORT).show();
}
}
});
}
public void createAlarm(int noOfHours)
{
//Create an offset from the current time in which the alarm will go off.
Calendar cal = Calendar.getInstance();
cal.add(Calendar.HOUR,noOfHours);
try{
//Create a new PendingIntent and add it to the AlarmManager
Intent alarmIntent = new Intent(this, MyAlarmService.class);
alarmIntent.putExtra("nel.example.alarms1","My message");
PendingIntent pendingAlarmIntent = PendingIntent.getService(this, 0,
alarmIntent, 0);
AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);
Calendar AlarmCal = Calendar.getInstance();
AlarmCal.setTimeInMillis(System.currentTimeMillis());
AlarmCal.set(Calendar.HOUR_OF_DAY, 0); // set user selection
AlarmCal.set(Calendar.MINUTE, 10); // set user selection
AlarmCal.set(Calendar.SECOND, 0);
alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,
AlarmCal.getTimeInMillis(), AlarmManager.INTERVAL_FIFTEEN_MINUTES,
pendingAlarmIntent);
Toast.makeText(getBaseContext(),
"Medicine Reminder Saved'",
Toast.LENGTH_SHORT).show();
}
catch (Exception e)
{
Toast.makeText(getBaseContext(), e.getMessage(),
Toast.LENGTH_SHORT).show();
}
}
Here is the latest Catlog of my app:
08-22 05:44:29.710: E/Trace(625): error opening trace file: No such file or directory (2)
08-22 05:44:30.430: D/dalvikvm(625): GC_CONCURRENT freed 202K, 3% free 8202K/8455K, paused 28ms+11ms, total 97ms
08-22 05:44:30.430: D/dalvikvm(625): WAIT_FOR_CONCURRENT_GC blocked 70ms
08-22 05:44:30.550: D/dalvikvm(625): GC_FOR_ALLOC freed 250K, 6% free 8260K/8711K, paused 44ms, total 45ms
08-22 05:44:31.100: I/Choreographer(625): Skipped 90 frames! The application may be doing too much work on its main thread.
08-22 05:44:31.132: D/gralloc_goldfish(625): Emulator without GPU emulation detected.
08-22 05:55:55.740: D/AndroidRuntime(625): Shutting down VM
08-22 05:55:55.740: W/dalvikvm(625): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
08-22 05:55:55.780: E/AndroidRuntime(625): FATAL EXCEPTION: main
08-22 05:55:55.780: E/AndroidRuntime(625): java.lang.RuntimeException: Unable to start activity ComponentInfo{dr.droid/dr.droid.MedicineReminder}: java.lang.NumberFormatException: Invalid int: ""
08-22 05:55:55.780: E/AndroidRuntime(625): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
08-22 05:55:55.780: E/AndroidRuntime(625): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
08-22 05:55:55.780: E/AndroidRuntime(625): at android.app.ActivityThread.access$600(ActivityThread.java:130)
08-22 05:55:55.780: E/AndroidRuntime(625): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
08-22 05:55:55.780: E/AndroidRuntime(625): at android.os.Handler.dispatchMessage(Handler.java:99)
08-22 05:55:55.780: E/AndroidRuntime(625): at android.os.Looper.loop(Looper.java:137)
08-22 05:55:55.780: E/AndroidRuntime(625): at android.app.ActivityThread.main(ActivityThread.java:4745)
08-22 05:55:55.780: E/AndroidRuntime(625): at java.lang.reflect.Method.invokeNative(Native Method)
08-22 05:55:55.780: E/AndroidRuntime(625): at java.lang.reflect.Method.invoke(Method.java:511)
08-22 05:55:55.780: E/AndroidRuntime(625): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
08-22 05:55:55.780: E/AndroidRuntime(625): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
08-22 05:55:55.780: E/AndroidRuntime(625): at dalvik.system.NativeStart.main(Native Method)
08-22 05:55:55.780: E/AndroidRuntime(625): Caused by: java.lang.NumberFormatException: Invalid int: ""
08-22 05:55:55.780: E/AndroidRuntime(625): at java.lang.Integer.invalidInt(Integer.java:138)
08-22 05:55:55.780: E/AndroidRuntime(625): at java.lang.Integer.parseInt(Integer.java:359)
08-22 05:55:55.780: E/AndroidRuntime(625): at java.lang.Integer.parseInt(Integer.java:332)
08-22 05:55:55.780: E/AndroidRuntime(625): at dr.droid.MedicineReminder.onCreate(MedicineReminder.java:33)
08-22 05:55:55.780: E/AndroidRuntime(625): at android.app.Activity.performCreate(Activity.java:5008)
08-22 05:55:55.780: E/AndroidRuntime(625): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
08-22 05:55:55.780: E/AndroidRuntime(625): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
08-22 05:55:55.780: E/AndroidRuntime(625): ... 11 more
08-22 05:55:57.971: I/Process(625): Sending signal. PID: 625 SIG: 9
Thanks!
|
|
|
|
|
One of the essential debugging skills is reading what's in front of you.
ljpv14 wrote: 08-22 05:55:55.780: E/AndroidRuntime(625): FATAL EXCEPTION: main
08-22 05:55:55.780: E/AndroidRuntime(625): java.lang.RuntimeException: Unable to start activity ComponentInfo{dr.droid/dr.droid.MedicineReminder}: java.lang.NumberFormatException: Invalid int: ""
tells you that your app crashed because you are trying to parse an empty string as an int.
A few lines further down,
ljpv14 wrote: 08-22 05:55:55.780: E/AndroidRuntime(625): Caused by: java.lang.NumberFormatException: Invalid int: ""
08-22 05:55:55.780: E/AndroidRuntime(625): at java.lang.Integer.invalidInt(Integer.java:138)
08-22 05:55:55.780: E/AndroidRuntime(625): at java.lang.Integer.parseInt(Integer.java:359)
08-22 05:55:55.780: E/AndroidRuntime(625): at java.lang.Integer.parseInt(Integer.java:332)
08-22 05:55:55.780: E/AndroidRuntime(625): at dr.droid.MedicineReminder.onCreate(MedicineReminder.java:33)
even tells you where in your code the problem was encountered.
That may not be the line in error, but it's the one that's blowing up.
Who ever would have thought that we could get so much information from a few lines of error messages?
Oh, by the way, you should be using code blocks when you paste your code.
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|