Daily Archives

Articles indexed Friday September 28 2012

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

  • Why doesn't Ubuntu detect my second hard drive?

    - by user93179
    I am new to Linux and to Ubuntu, I was wondering, I have two hard drives setup in SATA ports (non-raid, at least I don't think they are). I installed ubuntu unto the drives fresh without any previous versions or windows at all. However when I got the Ubuntu 12.04 LTS working, all I see is 1 x 120 gigabyte harddrive. Also, not sure if this is important or not, my hard drives are SSD. My computer specs are Asus P9Z77-V-LK Nvidia Geforce GTX 660 TI Intel i5 3570k 3.4 /proc/partitions shows: major minor #blocks name 8 0 117220824 sda 8 1 117219328 sda1 8 16 117220824 sdb 8 17 96256 sdb1 8 18 108780544 sdb2 8 19 8342528 sdb3 11 0 1048575 sr0 and ls -l /sys/block/ | grep -v /virtual/: lrwxrwxrwx 1 root root 0 Sep 27 17:26 sda - ../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda lrwxrwxrwx 1 root root 0 Sep 27 17:26 sdb - ../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sdb lrwxrwxrwx 1 root root 0 Sep 27 22:26 sdc - ../devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host6/target6:0:0/6:0:0:0/block/sdc lrwxrwxrwx 1 root root 0 Sep 27 22:04 sr0 - ../devices/pci0000:00/0000:00:1f.2/host3/target3:0:0/3:0:0:0/block/sr0 sudo file -s /dev/sd*: /dev/sda: x86 boot sector; partition 1: ID=0x7, starthead 32, startsector 2048, 234438656 sectors, code offset 0xc0, OEM-ID " ?", Bytes/sector 190, sectors/cluster 124, reserved sectors 191, FATs 6, root entries 185, sectors 64514 (volumes 32 MB) , physical drive 0x7e, dos 32 MB) , FAT (32 bit), sectors/FAT 749, reserved3 0x800000, serial number 0x35361a2b, unlabeled /dev/sdb2: Linux rev 1.0 ext4 filesystem data, UUID=387761ac-5eba-4d0f-93ba-746a82fb541d (needs journal recovery) (extents) (large files) (huge files) /dev/sdb3: data /dev/sdc: x86 boot sector; partition 1: ID=0xc, active, starthead 0, startsector 8064, 30473088 sectors, code offset 0xc0 /dev/sdc1: x86 boot sector, code offset 0x58, OEM-ID "SYSLINUX", sectors/cluster 64, reserved sectors 944, Media descriptor 0xf8, heads 128, hidden sectors 8064, sectors 30473088 (volumes 32 MB) , FAT (32 bit), sectors/FAT 3720, Backup boot sector 8, serial number 0xf90c12e9, label: "KINGSTON " /dev/sda1: x86 boot sector, code offset 0x52, OEM-ID "NTFS ", sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 255, hidden sectors 2048, dos 32 MB) , FAT (32 bit), sectors/FAT 749, reserved3 0x800000, serial number 0x35361a2b, unlabeled Any help would be greatly appreciated! Thanks Another thing I noticed is, when i use gparted to locate my drives, it seems that sda1 is my second drive that I am not detecting when I boot up and my ubuntu + FAT Boot files are installed in sdb1

    Read the article

  • Cron not able to succesfully change background

    - by Solenoid
    I'm running 12.04 with a custom XML background (modification on Day of Ubuntu) that changes based on time of day. I've noticed that there's a significant delay between when the changes are scheduled to take place in the XML file and when they actually show up on the background. I've also noticed that when I resume from suspend I don't get the correct background image either. I've found that cycling the wallpaper manually will fix this, and I've written a script to automate the process. If I execute the script manually it works fine. However, when I schedule the script to run in cron, cron doesn't change the background. To make sure that the script was being run properly by cron, I had it create a directory in my home folder after running the background change, and the directory is created successfully, so I know cron is running and executing the script. My script: #!/bin/bash sleep 5 gsettings set org.gnome.desktop.background picture-uri file:///home/zak/Pictures/Wallpaper/DOU2.xml sleep 1 gsettings set org.gnome.desktop.background picture-uri file:///home/zak/Pictures/Wallpaper/DOU.xml sleep 1 mkdir /home/zak/iscronworking exit Is cron just not able to access gsettings? The job is on my user crontab so it shouldn't be running as root. Alternately, is there any way to make Precise play nicely with XML wallpaper?

    Read the article

  • Can the update manager download only a single package at a time?

    - by SaultDon
    I need the update manager to only download a single package at a time and not try to download multiple packages at once. My slow internet cannot handle multiple connections; slows the download to a crawl and some packages will reset themselves halfway through when they time-out. EDIT When using apt-get update multiple repositories get checked: When using apt-get upgrade multiple packages are downloaded:

    Read the article

  • SEO For A Doman Name That Is A Dictionary Work Misspell [closed]

    - by Miles
    Possible Duplicate: How should I handle search engines auto-correcting the spelling of a site's name? My domain name is radiuus.com. Since the correct spelling of the word is with one u, when I search for "radiuus" on google it thinks I'm misspelling the word, kindly lets me know, and returns results for "radius". Example: https://www.google.com/search?q=radiuus&oq=radiuus&sugexp=chrome,mod=2&sourceid=chrome&ie=UTF-8 What can I do to prevent this? And taking this one step further: what can I do to get my site to show up when someone searches for "radius" spelled the correct way? Thanks!!

    Read the article

  • Vertex fog producing black artifacts

    - by Nick
    I originally posted this question on the XNA forums but got no replies, so maybe someone here can help: I am rendering a textured model using the XNA BasicEffect. When I enable fog, the model outline is still visible as many small black dots when it should be "in the fog". Why is this happening? Here's what it looks like for me -- http://tinypic.com/r/fnh440/6 Here is a minimal example showing my problem: (the ship model that this example uses is from the chase camera sample on this site -- http://xbox.create.msdn.com/en-US/education/catalog/sample/chasecamera -- in case anyone wants to try it out ;)) public class Game1 : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; SpriteBatch spriteBatch; Model model; public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; } protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); // TODO: use this.Content to load your game content here model = Content.Load<Model>("ship"); foreach (ModelMesh mesh in model.Meshes) { foreach (BasicEffect be in mesh.Effects) { be.EnableDefaultLighting(); be.FogEnabled = true; be.FogColor = Color.CornflowerBlue.ToVector3(); be.FogStart = 10; be.FogEnd = 30; } } } protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); // TODO: Add your drawing code here model.Draw(Matrix.Identity * Matrix.CreateScale(0.01f) * Matrix.CreateRotationY(3 * MathHelper.PiOver4), Matrix.CreateLookAt(new Vector3(0, 0, 30), Vector3.Zero, Vector3.Up), Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, 16f/9f, 1, 100)); base.Draw(gameTime); } }

    Read the article

  • How to switch between views in android?

    - by aurezza
    I've tried several methods to switch between two views in my program. I've tried creating a new thread then have the view run for 5 seconds before creating intent to start my main activity. This is the code snippet from the said view class: mHelpThread = new Thread(){ @Override public void run(){ try { synchronized(this){ // Wait given period of time or exit on touch wait(5000); } } catch(InterruptedException ex){ } finish(); // Run next activity Intent intent = new Intent(Intent.ACTION_MAIN, null); intent.addCategory(Intent.CATEGORY_HOME); startActivity(intent); //stop(); } }; mHelpThread.start(); I can access the said view without error but it doesn't disappear after 5 seconds nor did it switched to main view when I even utilized an onTouchEvent() to detect touch on the screen of which it should have automatically closed. I've also tried adding a button on the said view to manually switch to main view: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.help); final HelpView helpView = this; final Button btnback = (Button) findViewById(R.id.back); btnback.setOnClickListener(new View.OnClickListener(){ public void onClick(View v) { Intent intent = new Intent(helpView, MainActivity.class); startActivity(intent); } }); } These codes worked, though, for creating a launcher for my program. So I thought that it would work the same if I added an option for help/rules(for the game) that would switch to another view. I've only since started using eclipse for android so pardon my lack of knowledge. Here is also the snippet from my manifest: <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="15" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="MainActivity" android:label="@string/title_activity_main"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> <intent-filter></intent-filter> </activity> <activity android:name="SplashScreen" android:theme="@style/Theme.Transparent"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <activity android:name="HelpView" android:theme="@style/Theme.Transparent"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> <intent-filter></intent-filter> </activity> </application>

    Read the article

  • How to code a 4x shader/filter which emulates arcade crt display behavior?

    - by Arthur Wulf White
    I want to write a shader/filer probably in adobe Pixel Bender that will do the best job possible in emulating the fill of an oldskul monochromatic arcade CRT screen. Much like this here: http://filthypants.blogspot.com/2012/07/customizing-cgwgs-crt-pixel-shader.html Here are some attributes I know will exist in this filter: It will take in a low res image 160 x 120 and return a medium res image 640 x 480. It will add scanlines It will blur the color channels to create that color bleeding effect It will distort the shape of the image from a perfect rectangle into a rounder shape. The question is, could you please provide any other attributes that are beneficial to emulating an arcade CRT feel and links and resources on coding these effects. Thanks

    Read the article

  • What happened to the Journal of Game Development?

    - by Ricket
    The lengthy mission statement from its website states: The lack of game-specific research has prevented many in the academic community from embracing game development as a serious field of study. The Journal of Game Development (JOGD), however, provides a much-needed, peer-reviewed, medium of communication and the raison d'etre for serious academic research focused solely on game-related issues. The JOGD provides the vehicle for disseminating research and findings indigenous to the game development industry. It is an outlet for peer-reviewed research that will help validate the work and garner acceptance for the study of game development by the academic community. JOGD will serve both the game development industry and academic community by presenting leading-edge, original research, and theoretical underpinnings that detail the most recent findings in related academic disciplines, hardware, software, and technology that will directly affect the way games are conceived, developed, produced, and delivered. The Journal of Game Development was established in 2003. It's hard to find any information about the issues but at four issues per year, I estimate the last issue was distributed sometime in 2005 or 2006. It had a good editorial board of college professors and a founding editor from Ubisoft. The list of articles looks good. The price was reasonable. So what happened to it? Its website recently went down but you can see the last Archive.org version. The editor-in-chief is a professor at my school so I intend to ask him in person in a week or two, but I thought I'd see what you might be able to dig up about it first. Of course I will be sure to add an answer with his official word on the matter at that time.

    Read the article

  • MassTransit Saga - Errors & Inconsistencies

    - by Tolu
    I've implemented a masstransit saga that works as should, a lot of times. However, there are times when the messages go to the error queue or just seem to disappear. I'd like to know: 1. How do I get the reason/exception message that causes a message to go to the error queue? (NOTE: My handler logic is within a try-catch block so apparently these errors happen even before the handler logic is called) 2. What could be responsible for the lost messages? Thanks in advance.

    Read the article

  • jre1.6.0_27 HashMap values() sourcecode

    - by Liu guanghua
    Today, I opened jre1.6.0_27 HashMap values() method sourcecode 389 public Set<K> keySet() 390 { 391 Set localSet = this.keySet; 392 return (this.keySet = new KeySet(null)); 393 } 394 395 public Collection<V> values() 396 { 397 Collection localCollection = this.values; 398 return (this.values = new Values(null)); 399 } I think these sourcecode are error, but I don't know why they look like this. Who can tell me why?

    Read the article

  • Running Python code from Java program, shoudl i be doing this?

    - by Space Rocker
    i have a scenario where i draw a network and set all it's paraments on swing based gui, after that i have to translate this network into a python based script which another framework reads and realize this network in the form of virtual machines. As an example have look here: from mininet.topo import Topo, Node class MyTopo( Topo ): def *__init__*( self, enable_all = True ): super( MyTopo, self ).__init__() Host = 1 Switch = 2 self.add_node( Switch, Node( is_switch=True ) ) self.add_node( Host, Node( is_switch=False ) ) self.add_edge( Host, Switch ) self.enable_all() topos = { 'mytopo': ( lambda: MyTopo() ) } It simply connects a host to a switch and realize this topology on mininet framework. Now for now in order to realize the drawn network on java GUI here is what i am doing: I simply take the information from GUI and creates a new python file like the one above using java code and then run this file in mininet, which works fine somehow. I want to know, is this the correct and robust way how i am doing this or should i be looking further into java-python bridge like scenarios to be more effective or so as to say more professional.

    Read the article

  • Navigating to rootViewController of non-visible UINavigationController CRASH

    - by Bertie
    First off I'n not sure if this is exactly the issue... but it appears to be central to the problem. There are vast gaps in what I know and this may be something very obvious. I have a split view controller with various Master and Detail Views. From one 'menu' branch I want to return to the rootView of both the Master & Detail Navigation Controllers when the user taps a 'Done' button. Initially I had the button positioned on the navigation bar of the master view. This is the code I was using: - (IBAction)doneClicked:(id)sender { UINavigationController *detailNav = [self.splitViewController.viewControllers objectAtIndex:1]; NSArray *allDetailViewControllers = detailNav.viewControllers; HomePage *destinationDetailVC = [allDetailViewControllers objectAtIndex:0]; destinationDetailVC.splitViewBarButtonItem = self.splitViewButton; [detailNav popToRootViewControllerAnimated:NO]; [self.navigationController popToRootViewControllerAnimated:NO]; } That works fine but if the device is in portrait mode it means the user has to open the menus to access the button. So I decided to put the 'Done' button onto the detail view NavBar instead. Using a delegate declared in the detailVC and adopted by the masterVC I am now using this method: - (void)theUserClickedDoneInTheDetailView:(DetailVC *)controller withButton:(UIBarButtonItem *)splitViewButton { UINavigationController *detailNav = [self.splitViewController.viewControllers objectAtIndex:1]; NSArray *allDetailViewControllers = detailNav.viewControllers; HomePage *destinationDetailVC = [allDetailViewControllers objectAtIndex:0]; destinationDetailVC.splitViewBarButtonItem = splitViewButton; [detailNav popToRootViewControllerAnimated: NO]; [self.navigationController popToRootViewControllerAnimated:NO]; } Both methods are in the MasterVC.m file The only difference between the two is that on is passed a UIBarButtonItem to use and the other has already had it passed when it is set in the detail view. That seems to be working because I do get a button. When the device is in Landscape mode both methods work fine. All behaviour as expected. When the device is in Portrait the first method still works fine. The second appears to work fine and the detail view is the rootView, the button for the menus is there BUT, as soon as I turn the device to landscape it crashes. The only thing I can think of is that it is because the masterView is hidden. Can anyone help...?

    Read the article

  • Jackson object mapping - map incoming JSON field to protected property in base class

    - by Pete
    We use Jersey/Jackson for our REST application. Incoming JSON strings get mapped to the @Entity objects in the backend by Jackson to be persisted. The problem arises from the base class that we use for all entities. It has a protected id property, which we want to exchange via REST as well so that when we send an object that has dependencies, hibernate will automatically fetch these dependencies by their ids. Howevery, Jackson does not access the setter, even if we override it in the subclass to be public. We also tried using @JsonSetter but to no avail. Probably Jackson just looks at the base class and sees ID is not accessible so it skips setting it... @MappedSuperclass public abstract class AbstractPersistable<PK extends Serializable> implements Persistable<PK> { @Id @GeneratedValue(strategy = GenerationType.AUTO) private PK id; public PK getId() { return id; } protected void setId(final PK id) { this.id = id; } Subclasses: public class A extends AbstractPersistable<Long> { private String name; } public class B extends AbstractPersistable<Long> { private A a; private int value; // getter, setter // make base class setter accessible @Override @JsonSetter("id") public void setId(Long id) { super.setId(id); } } Now if there are some As in our database and we want to create a new B via the REST resource: @POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @Transactional public Response create(B b) { if (b.getA().getId() == null) cry(); } with a JSON String like this {"a":{"id":"1","name":"foo"},"value":"123"}. The incoming B will have the A reference but without an ID. Is there any way to tell Jackson to either ignore the base class setter or tell it to use the subclass setter instead? I've just found out about @JsonTypeInfo but I'm not sure this is what I need or how to use it. Thanks for any help!

    Read the article

  • Ruby on Rails with_option cannot call class method

    - by Dmitri
    I have a problem calling class method from the with_option block with validations: Model: class Model < ActiveRecord::Base attr_accessible :field with_options :if => "<not important>" do |step| ... bunch of validations step.validates :field, :inclusion => {:within => Model.field} end private self.field (1..10) end end And it returns: undefined method `field' for #Class:0x5f394a8 self.class.field also doesn't work. What is wrong with it ? How to fix it ? Big big thanks!

    Read the article

  • converting a form from text to textarea

    - by David Cook
    I have a form created to pull PHP values into my database. I created the form with all type="text" constructions. What follows is the code that used to set up the input of data and confirmed that it is functional. <label>About Me: <input type="text" name="BIO_info"/></label> I converted the input to a textarea and adjusted some parameters for proper display. Unfortunately, it has broken the ability for the script to function. What follows is the code I wrote to convert and store from a text area input. <label for="BIO_info" style=" margin-bottom: 500px; margin-top: 2000px; ">About Me: <textarea name="BIO_info" rows="20" cols="60" style="resize: none; overflow-y: hidden;vertical-align:middle;"></textarea> <p> I would appreciate any suggestions.

    Read the article

  • How to change default font in netbeans platform?

    - by nathan
    I'd like to know how to change the default font used in netbeans platform. I'm not asking for changing the font in the Netbeans IDE but in the platform, then all my derived applications would use this default font. A netbeans application is a group of Jcomponent so i could easily set the font of each of those components but there is still things like notifications that i can't access directly to change the font, so i think the best would be to change the font by default. Programmaticaly or any other way... maybe editing one the jar?

    Read the article

  • How can a servlet always perform the same task?

    - by membersound
    I want a Servlet to perform always the same tasks. Regardless of if it is a GET or POST. At the moment I just call the doGet() from doPost(), which works fine. Then I tried overriding the service() method, and I thought it would just work the same way. But it does not! The code somehow gets executed, but the response does not generate the webpage: response.getWriter(); response.println(string); This code works for the doGet/doPost methods, but not for the service. Why? Servlet: class MyWebServlet extends HttpServlet { @Override public void service(ServletRequest request, ServletResponse response) { response.setContentType("text/html"); PrintWriter out = response.getWriter(); String string = "teststring"; out.println(string); } }

    Read the article

  • Why display SELECT value is not changing?

    - by I'll-Be-Back
    When the page load, I expected <option value="B">B</option> value to change to red. It didn't work. Why? jQuery $(document).ready(function () { $('[name=HeaderFields] option[value="B"]').val('red'); } Dropdown: <select name="HeaderFields" style="width:60px"> <option value="A">A</option> <option value="B">B</option> <option value="C">C</option> </select>

    Read the article

  • Android Out of memory regarding png image

    - by turtleboy
    I have a jpg image in my app that shows correctly. In my listview i'd like to make the image more transparent so it is easier to see the text. I changed the image to a png format and altered it's opacity in GIMP. Now that the new image is in the app drawable folder. Im getting the following error. why? 09-28 09:24:07.560: I/global(20140): call socket shutdown, tmpsocket=Socket[address=/178.250.50.40,port=80,localPort=35172] 09-28 09:24:07.570: I/global(20140): call socket shutdown, tmpsocket=Socket[address=/212.169.27.217,port=84,localPort=55656] 09-28 09:24:07.690: D/dalvikvm(20140): GC_FOR_ALLOC freed 113K, 4% free 38592K/39907K, paused 32ms 09-28 09:24:07.690: I/dalvikvm-heap(20140): Forcing collection of SoftReferences for 28072816-byte allocation 09-28 09:24:07.740: D/dalvikvm(20140): GC_BEFORE_OOM freed 9K, 4% free 38582K/39907K, paused 43ms 09-28 09:24:07.740: E/dalvikvm-heap(20140): Out of memory on a 28072816-byte allocation. 09-28 09:24:07.740: I/dalvikvm(20140): "main" prio=5 tid=1 RUNNABLE 09-28 09:24:07.740: I/dalvikvm(20140): | group="main" sCount=0 dsCount=0 obj=0x40a57490 self=0x1b6e9a8 09-28 09:24:07.740: I/dalvikvm(20140): | sysTid=20140 nice=0 sched=0/0 cgrp=default handle=1074361640 09-28 09:24:07.740: I/dalvikvm(20140): | schedstat=( 2289118000 760844000 2121 ) utm=195 stm=33 core=1 09-28 09:24:07.740: I/dalvikvm(20140): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method) 09-28 09:24:07.740: I/dalvikvm(20140): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:486) 09-28 09:24:07.740: I/dalvikvm(20140): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:773) 09-28 09:24:07.740: I/dalvikvm(20140): at android.content.res.Resources.loadDrawable(Resources.java:2042) 09-28 09:24:07.740: I/dalvikvm(20140): at android.content.res.TypedArray.getDrawable(TypedArray.java:601) 09-28 09:24:07.740: I/dalvikvm(20140): at android.view.View.<init>(View.java:2812) 09-28 09:24:07.740: I/dalvikvm(20140): at android.view.ViewGroup.<init>(ViewGroup.java:410) 09-28 09:24:07.740: I/dalvikvm(20140): at android.widget.LinearLayout.<init>(LinearLayout.java:174) 09-28 09:24:07.740: I/dalvikvm(20140): at android.widget.LinearLayout.<init>(LinearLayout.java:170) 09-28 09:24:07.740: I/dalvikvm(20140): at java.lang.reflect.Constructor.constructNative(Native Method) 09-28 09:24:07.740: I/dalvikvm(20140): at java.lang.reflect.Constructor.newInstance(Constructor.java:417) 09-28 09:24:07.740: I/dalvikvm(20140): at android.view.LayoutInflater.createView(LayoutInflater.java:586) 09-28 09:24:07.740: I/dalvikvm(20140): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) 09-28 09:24:07.740: I/dalvikvm(20140): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:653) 09-28 09:24:07.740: I/dalvikvm(20140): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:678) 09-28 09:24:07.740: I/dalvikvm(20140): at android.view.LayoutInflater.inflate(LayoutInflater.java:466) 09-28 09:24:07.740: I/dalvikvm(20140): at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 09-28 09:24:07.740: I/dalvikvm(20140): at android.view.LayoutInflater.inflate(LayoutInflater.java:352) 09-28 09:24:07.740: I/dalvikvm(20140): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:278) 09-28 09:24:07.740: I/dalvikvm(20140): at android.app.Activity.setContentView(Activity.java:1897) 09-28 09:24:07.740: I/dalvikvm(20140): at com.carefreegroup.ShowMoreDetails.onCreate(ShowMoreDetails.java:26) 09-28 09:24:07.740: I/dalvikvm(20140): at android.app.Activity.performCreate(Activity.java:4543) 09-28 09:24:07.740: I/dalvikvm(20140): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1071) 09-28 09:24:07.740: I/dalvikvm(20140): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2181) 09-28 09:24:07.740: I/dalvikvm(20140): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2260) 09-28 09:24:07.740: I/dalvikvm(20140): at android.app.ActivityThread.access$600(ActivityThread.java:139) 09-28 09:24:07.740: I/dalvikvm(20140): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277) 09-28 09:24:07.740: I/dalvikvm(20140): at android.os.Handler.dispatchMessage(Handler.java:99) 09-28 09:24:07.740: I/dalvikvm(20140): at android.os.Looper.loop(Looper.java:156) 09-28 09:24:07.740: I/dalvikvm(20140): at android.app.ActivityThread.main(ActivityThread.java:5045) 09-28 09:24:07.740: I/dalvikvm(20140): at java.lang.reflect.Method.invokeNative(Native Method) 09-28 09:24:07.740: I/dalvikvm(20140): at java.lang.reflect.Method.invoke(Method.java:511) 09-28 09:24:07.740: I/dalvikvm(20140): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 09-28 09:24:07.740: I/dalvikvm(20140): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 09-28 09:24:07.740: I/dalvikvm(20140): at dalvik.system.NativeStart.main(Native Method) 09-28 09:24:07.740: E/dalvikvm(20140): Out of memory: Heap Size=46115KB, Allocated=38582KB, Limit=65536KB 09-28 09:24:07.740: E/dalvikvm(20140): Extra info: Footprint=39907KB, Allowed Footprint=46115KB, Trimmed=892KB 09-28 09:24:07.740: E/Bitmap_JNI(20140): Create Bitmap Failed. 09-28 09:24:07.740: A/libc(20140): Fatal signal 11 (SIGSEGV) at 0x00000004 (code=1) 09-28 09:24:09.750: I/dalvikvm(20367): Turning on JNI app bug workarounds for target SDK version 10... 09-28 09:24:09.940: D/dalvikvm(20367): GC_CONCURRENT freed 864K, 21% free 3797K/4771K, paused 2ms+2ms thanks. [update] @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.showmoredetailslayout); actualCallTime = (TextView)findViewById(R.id.actualcalltime); doubleUp = (TextView)findViewById(R.id.doubleupcallid); needName = (TextView)findViewById(R.id.needname); needNameLabel = (TextView)findViewById(R.id.neednamelabel); getRotaDetails = (Button)findViewById(R.id.buttongetrotadetails); intent = this.getIntent(); String actualTimeIn = intent.getStringExtra("actTimeIn"); String actualTimeOut = intent.getStringExtra("actTimeOut"); String doubleUpValue = intent.getStringExtra("doubleUpValue"); String needNameWithCommas = intent.getStringExtra("needNameWithCommas"); callID = intent.getStringExtra("callID"); String[] needs = needNameWithCommas.split(","); actualCallTime.setText("This call was completed at " + actualTimeIn + " -" + actualTimeOut); if( ! doubleUpValue.equalsIgnoreCase("") || doubleUpValue.equalsIgnoreCase("]")){ doubleUp.setText("This call was not a double up "); }else{ doubleUp.setText("This call was a double up " + doubleUpValue); } needNameLabel.setText("Purpose of Call: "); for (int i = 0; i < needs.length; i++){ needName.append( needs[i] + "\n"); } getRotaDetails.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(ShowMoreDetails.this, GetRotaDetails.class); intent.putExtra("callIDExtra", callID); startActivity(intent); } }); } }

    Read the article

  • Synfony2 validation changes invalid integer to 0

    - by Craig
    I've added validation to a form and found that in some cases it is losing the invalid data I am feeding it and saving 0s instead. The output at the bottom shows that if I post the latitude as 'zzzzzz' (clearly not a number nor between -90 and 90) the form is declared as valid and saved with the value 0 How can that happen given that I have declared the input must be a number? ProxyType.php buildForm() $builder ->add('siteName', null, array('label' => 'Site name')) .... ->add('latitude', 'number', array('label' => 'Latitude')) ->add('longitude', 'number', array('label' => 'Longitude')) .... ; ProxyController.php createAction .... $postData = $request->request->get('niwa_pictbundle_proxytype'); $this->get('logger')->info('Posted latitude = '.$postData['latitude']); $form = $this->createForm(new ProxyType(), $entity); $form->bindRequest($request); if ($form->isValid()) { $this->get('logger')->info('Form declared valid : latlong ('.$entity->getLatitude().','.$entity->getLongitude().')'); .... validation.yml Acme\PictBundle\Entity\Proxy: properties: longitude: - Min: { limit: -180 } - Max: { limit: 180 } latitude: - Max: { limit: 90 } - Min: { limit: -90 } Output [2012-09-28 02:05:30] app.INFO: Posted latitude = zzzzzz [] [] [2012-09-28 02:05:30] app.INFO: Form declared valid : latlong (0,0) [] []

    Read the article

  • TextBox should display text in hexadecimal in a specific format

    - by Owais Wani
    I have a textbox in my xaml file which is editable. Now according to my project requirements content in textbox should only be 0-9 and a-f (hexadecimal values) and textbox should take the input based on hexadecimal values. Demonstratation: 12 ab 32 a5 64 Now if my cursor is at the end and i go on pressing backspace, it shud remove the values as it happens in a general text box. Now If my cursor is at the beginning of a5, and i press "delete key", the value should become like: 12 ab 32 56 4 If my cursor is at the end of a5 and i press the 'delete key" nothing should happen. I had done this successful in my C++ application as follows: void CMSP430CommPanel::textEditorTextChanged (TextEditor& editor) { if(&editor == m_texti2cWrite) { int count = 0; int location; String text1 = m_texti2cWrite->getText(); String text = m_texti2cWrite->getText().removeCharacters(" "); String hexString = String::empty; int countCaret = m_texti2cWrite->getCaretPosition(); for(int i=0; i < text.length(); i++) { hexString = hexString + String (&text[i], 1); if((i+1) % 2 == 0) { if(i != text.length()-1) { hexString = hexString + T(" "); count ++; } } count ++; } m_texti2cWrite->setText(hexString,false); if(text1.length() == m_texti2cWrite->getCaretPosition()) { m_texti2cWrite->setCaretPosition(count); } else { m_texti2cWrite->setCaretPosition(countCaret); } } } where m_texti2cWrite is the name given to textbox. How can i implement the same case in my wpf application which is MVVM based. I have a textbox which shud take inputs as I said above. please help!!!

    Read the article

  • Mysql Query is not working in edited jTable code, why?

    - by Furkan Kadioglu
    I'm using this example: www.jtable.org I've downloaded the jTable PHP version. I then edited the script. The jTable simple version is working, but my edited version isn't. I can create a list, but I can't add a row; this code is causing problems. However, PHP doesn't display any error messages. else if($_GET["action"] == "create") { //Insert record into database $result = mysql_query("INSERT INTO veriler(bolge, sehir, firma, adres, tel, web) VALUES('" . $_POST["bolge"] . "', '" . $_POST["sehir"] . "', '" . $_POST["firma"] . "', '" . $_POST["adres"] . "', '" . $_POST["tel"] . "', '" . $_POST["web"] . "'"); //Get last inserted record (to return to jTable) $result = mysql_query("SELECT * FROM veriler WHERE id = LAST_INSERT_ID();"); $row = mysql_fetch_array($result); //Return result to jTable $jTableResult = array(); $jTableResult['Result'] = "OK"; $jTableResult['Record'] = $row; print json_encode($jTableResult); } What is the problem?

    Read the article

  • Android library to get pitch from WAV file

    - by Sakura
    I have a list of sampled data from the WAV file. I would like to pass in these values into a library and get the frequency of the music played in the WAV file. For now, I will have 1 frequency in the WAV file and I would like to find a library that is compatible with Android. I understand that I need to use FFT to get the frequency domain. Is there any good libraries for that? I found that [KissFFT][1] is quite popular but I am not very sure how compatible it is on Android. Is there an easier and good library that can perform the task I want? EDIT: I tried to use JTransforms to get the FFT of the WAV file but always failed at getting the correct frequency of the file. Currently, the WAV file contains sine curve of 440Hz, music note A4. However, I got the result as 441. Then I tried to get the frequency of G4, I got the result as 882Hz which is incorrect. The frequency of G4 is supposed to be 783Hz. Could it be due to not enough samples? If yes, how much samples should I take? //DFT DoubleFFT_1D fft = new DoubleFFT_1D(numOfFrames); double max_fftval = -1; int max_i = -1; double[] fftData = new double[numOfFrames * 2]; for (int i = 0; i < numOfFrames; i++) { // copying audio data to the fft data buffer, imaginary part is 0 fftData[2 * i] = buffer[i]; fftData[2 * i + 1] = 0; } fft.complexForward(fftData); for (int i = 0; i < fftData.length; i += 2) { // complex numbers -> vectors, so we compute the length of the vector, which is sqrt(realpart^2+imaginarypart^2) double vlen = Math.sqrt((fftData[i] * fftData[i]) + (fftData[i + 1] * fftData[i + 1])); //fd.append(Double.toString(vlen)); // fd.append(","); if (max_fftval < vlen) { // if this length is bigger than our stored biggest length max_fftval = vlen; max_i = i; } } //double dominantFreq = ((double)max_i / fftData.length) * sampleRate; double dominantFreq = (max_i/2.0) * sampleRate / numOfFrames; fd.append(Double.toString(dominantFreq)); Can someone help me out? EDIT2: I manage to fix the problem mentioned above by increasing the number of samples to 100000, however, sometimes I am getting the overtones as the frequency. Any idea how to fix it? Should I use Harmonic Product Frequency or Autocorrelation algorithms?

    Read the article

  • Android as SIP to GSM gateway

    - by user346034
    Soon I could use a SIP to GSM gateway, because I'll need to make phone calls from Germany to a mobile phone in Czech Republik. Hence, I thought about implementing one. Now, the questions are: Does such a solution already exist (for a reasonable price)? Is it possible to redirect a (voice) stream to a GSM connection with the available Android APIs (SDK or NDK)? Ideas, suggestions, comments are highly welcome.

    Read the article

  • How can I increment a counter every N loops in JMeter?

    - by Dave Hunt
    I want to test concurrency, and reliably replicate an issue that JMeter brought to my attention. What I want to do is set a unique identifier (currently the time in milliseconds with a counter appended) and increment the counter between loops but not between threads. The idea being that the number of threads I have set up is the number of identical identifiers before incrementing and using another. If I had 3 threads with a loop count of 2 I want: 1. Unique ID: <current-time-in-millis>000000 2. Unique ID: <current-time-in-millis>000000 3. Unique ID: <current-time-in-millis>000000 4. Unique ID: <current-time-in-millis>000001 5. Unique ID: <current-time-in-millis>000001 6. Unique ID: <current-time-in-millis>000001 I've tried using Throughput Controllers to increment a counter, as well as several other things that seemed they should work but had no luck. This seems like something JMeter should be able to do. Is there any way to get the value of the loop count?

    Read the article

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