Daily Archives

Articles indexed Thursday September 20 2012

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

  • Boot Failure: No default or UI configuration directive found Normal install on laptop [closed]

    - by user79920
    I have had Ubuntu on my laptop for quite a while, it's just a standard install, no partitioning off, no wierdness of any other sort, just ubuntu. Today my computer started to lag really bad so I tried to restart it, but after bios loaded I just got an error that said "ERROR: No configuration file found No DEFAULT or UI configuration directive found!" After that it had "boot:" and a cursor, like it expects me to type something. Once again, this is just a normal install on my hard drive, not a VM or booting from USB. It's Ubuntu 12.04 on a Sony Vaio VGN-SZ240P Any help is appreciated!

    Read the article

  • Dependency problems installing wine 1.5 on ubuntu 12.04 x64

    - by Moreno
    I tried: $ sudo add-apt-repository ppa:ubuntu-wine/ppa $ sudo apt-get update $ sudo apt-get install wine1.5 result was: $ sudo apt-get install wine1.5 Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: wine1.5 : Depends: wine1.5-i386 (= 1.5.6-0ubuntu1~pulse17) E: Unable to correct problems, you have held broken packages. then I tried: $ sudo dpkg --configure -a $ sudo apt-get install -f result was: $ sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. after all I tried: $ sudo apt-get build-dep wine1.5 Reading package lists... Done Building dependency tree Reading state information... Done The following packages have unmet dependencies: libgnutls-dev : Depends: libgnutls26 (= 2.12.14-5ubuntu3) but 2.12.19-1 is to be installed Depends: libgnutlsxx27 (= 2.12.14-5ubuntu3) but it is not going to be installed Depends: libgnutls-openssl27 (= 2.12.14-5ubuntu3) but it is not going to be installed E: Build-dependencies for wine1.5 could not be satisfied. also tried: $ sudo apt-get install -y ia32-libs Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: ia32-libs : Depends: ia32-libs-multiarch E: Unable to correct problems, you have held broken packages. Using synaptic: using ubuntu software center (USC): Somebody can help me? Thanks. Trying again: $ sudo dpkg --configure -a $ sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded. $ sudo apt-get install wine1.5 Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: wine1.5 : Depends: wine1.5-i386 (= 1.5.10-0ubuntu1~pulse19+build4) E: Unable to correct problems, you have held broken packages.

    Read the article

  • Wireless not working on Dell XPS 17 after installing 12.04

    - by user60622
    I (linux newbie) have a Dell XPS 17 and tried to install Ubuntu 12.04. After installation all WLAN accesspoints near are detected. But I can not connect (but I am able to connect with other computers as well as with Dell XPS 17 under windows). Outputs: iwconfig lo no wireless extensions. wlan0 IEEE 802.11bg ESSID:"LerchenPoint" Mode:Managed Frequency:2.412 GHz Access Point: 58:6D:8F:A0:2D:58 Bit Rate=1 Mb/s Tx-Power=14 dBm Retry long limit:7 RTS thr:off Fragment thr:off Power Management:off Link Quality=70/70 Signal level=-37 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:19 Missed beacon:0 eth0 no wireless extensions. sudo lshw -class network *-network description: Wireless interface product: Centrino Wireless-N 1000 vendor: Intel Corporation physical id: 0 bus info: pci@0000:04:00.0 logical name: wlan0 version: 00 serial: 00:26:c7:99:98:28 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless configuration: broadcast=yes driver=iwlwifi driverversion=3.2.0-24-generic firmware=39.31.5.1 build 35138 latency=0 link=no multicast=yes wireless=IEEE 802.11bg resources: irq:50 memory:f0400000-f0401fff *-network description: Ethernet interface product: RTL8111/8168B PCI Express Gigabit Ethernet controller vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:0a:00.0 logical name: eth0 version: 06 serial: f0:4d:a2:56:e3:94 size: 1Gbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8168e-2.fw ip=192.168.0.123 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s resources: irq:47 ioport:6000(size=256) memory:f0a04000-f0a04fff memory:f0a00000-f0a03fff dmesg | grep iwl [ 10.157531] iwlwifi 0000:04:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 [ 10.157561] iwlwifi 0000:04:00.0: setting latency timer to 64 [ 10.157598] iwlwifi 0000:04:00.0: pci_resource_len = 0x00002000 [ 10.157599] iwlwifi 0000:04:00.0: pci_resource_base = ffffc90011090000 [ 10.157601] iwlwifi 0000:04:00.0: HW Revision ID = 0x0 [ 10.157731] iwlwifi 0000:04:00.0: irq 50 for MSI/MSI-X [ 10.157834] iwlwifi 0000:04:00.0: Detected Intel(R) Centrino(R) Wireless-N 1000 BGN, REV=0x6C [ 10.157976] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S [ 10.179772] iwlwifi 0000:04:00.0: device EEPROM VER=0x15d, CALIB=0x6 [ 10.179775] iwlwifi 0000:04:00.0: Device SKU: 0X50 [ 10.179777] iwlwifi 0000:04:00.0: Valid Tx ant: 0X1, Valid Rx ant: 0X3 [ 10.179796] iwlwifi 0000:04:00.0: Tunable channels: 13 802.11bg, 0 802.11a channels [ 10.574728] iwlwifi 0000:04:00.0: loaded firmware version 39.31.5.1 build 35138 [ 10.726409] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs' [ 19.714132] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S [ 19.777862] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S [ 2251.603089] iwlwifi 0000:04:00.0: PCI INT A disabled [ 2266.578350] iwlwifi 0000:04:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17 [ 2266.578399] iwlwifi 0000:04:00.0: setting latency timer to 64 [ 2266.578435] iwlwifi 0000:04:00.0: pci_resource_len = 0x00002000 [ 2266.578437] iwlwifi 0000:04:00.0: pci_resource_base = ffffc90011090000 [ 2266.578439] iwlwifi 0000:04:00.0: HW Revision ID = 0x0 [ 2266.578704] iwlwifi 0000:04:00.0: irq 50 for MSI/MSI-X [ 2266.578808] iwlwifi 0000:04:00.0: Detected Intel(R) Centrino(R) Wireless-N 1000 BGN, REV=0x6C [ 2266.578916] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S [ 2266.600709] iwlwifi 0000:04:00.0: device EEPROM VER=0x15d, CALIB=0x6 [ 2266.600712] iwlwifi 0000:04:00.0: Device SKU: 0X50 [ 2266.600713] iwlwifi 0000:04:00.0: Valid Tx ant: 0X1, Valid Rx ant: 0X3 [ 2266.600727] iwlwifi 0000:04:00.0: Tunable channels: 13 802.11bg, 0 802.11a channels [ 2266.605978] iwlwifi 0000:04:00.0: loaded firmware version 39.31.5.1 build 35138 [ 2266.606331] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs' [ 2266.614179] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S [ 2266.681541] iwlwifi 0000:04:00.0: L1 Enabled; Disabling L0S Solutions I tried: rfkill list all 0: dell-wifi: Wireless LAN Soft blocked: no Hard blocked: no 2: phy0: Wireless LAN Soft blocked: no Hard blocked: no echo "options iwlwifi 11n_disable=1" | sudo tee /etc/modprobe.d/iwlwifi.conf options iwlwifi 11n_disable=1 sudo modprobe -rfv iwlwifi WARNING: All config files need .conf: /etc/modprobe.d/blacklist, it will be ignored in a future release. rmmod /lib/modules/3.2.0-24-generic/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko rmmod /lib/modules/3.2.0-24-generic/kernel/net/mac80211/mac80211.ko rmmod /lib/modules/3.2.0-24-generic/kernel/net/wireless/cfg80211.ko sudo modprobe iwlwifi WARNING: All config files need .conf: /etc/modprobe.d/blacklist, it will be ignored in a future release. replacing iwlwifi-1000-5.ucode (current driver) against iwlwifi-1000-3.ucode sudo jockey-gtk: (jockey-gtk:2493): Gtk-CRITICAL **: gtk_icon_set_render_icon_pixbuf: assertion icon_set != NULL' failed (jockey-gtk:2493): Gtk-CRITICAL **: gtk_icon_set_render_icon_pixbuf: assertion icon_set != NULL' failed nothing is listet in "Additional drivers" (german: "Zusätzliche Treiber"). gksudo gedit /etc/modprobe.d/blacklist.conf add "blacklist acer_wmi" Any help would be appreciated very much. Thanks!!

    Read the article

  • Installing Ubuntu before or after upgrading from Vista to Win 7?

    - by amh
    I just got a new SSD hard drive for my thinkpad laptop. I just installed Vista with the factory CDs. On my old OS, my main OS was Ubuntu but I do want to keep Windows on a separate partition as a dual booth system. I definitely want to upgrade to Win 7 though and I will get it in a few days. My question is: should I install Ubuntu now and then upgrade to Win 7 in a few days? or is that going to mess up with the grub (or something else)? If that is the case, then I'd rather wait to install Ubuntu until after I upgrade to Vista. P.S. I know that probably any kind of mess done by the Win upgrade could be fixed, but I just want to avoid wasting time.

    Read the article

  • How to Determine VPS Hosting Resources Needs for my upcoming Wordpress blog? How much resources should i purchase? [closed]

    - by Ishwar dixit
    Possible Duplicate: How to find web hosting that meets my requirements? Decided to purchase VPS hosting but Getting confused on amount of Resources i need? Wordpress will be used as platform, The blog i want to setup is assumed to have a traffic between 20k - 25k Visits per day with a rate of 5 pageviews per visit... there is No Download Facility provided...the content of the blog will be Text, Images & videos (will be used rarely)... The main question is? For the above requirement: How much RAM will be enough? How much CPU usage i will need? How much Bandwidth will be enough? How much Disk Space? Any other Requirement? Thanx in Advance..

    Read the article

  • XNA RTS A* pathfinding issues

    - by Slayter
    I'm starting to develop an RTS game using the XNA framework in C# and am still in the very early prototyping stage. I'm working on the basics. I've got unit selection down and am currently working on moving multiple units. I've implemented an A* pathfinding algorithm which works fine for moving a single unit. However when moving multiple units they stack on top of each other. I tried fixing this with a variation of the boids flocking algorithm but this has caused units to sometimes freeze and get stuck trying to move but going no where. Ill post the related methods for moving the units below but ill only post a link to the pathfinding class because its really long and i don't want to clutter up the page. These parts of the code are in the update method for the main controlling class: if (selectedUnits.Count > 0) { int indexOfLeader = 0; for (int i = 0; i < selectedUnits.Count; i++) { if (i == 0) { indexOfLeader = 0; } else { if (Vector2.Distance(selectedUnits[i].position, destination) < Vector2.Distance(selectedUnits[indexOfLeader].position, destination)) indexOfLeader = i; } selectedUnits[i].leader = false; } selectedUnits[indexOfLeader].leader = true; foreach (Unit unit in selectedUnits) unit.FindPath(destination); } foreach (Unit unit in units) { unit.Update(gameTime, selectedUnits); } These three methods control movement in the Unit class: public void FindPath(Vector2 destination) { if (path != null) path.Clear(); Point startPoint = new Point((int)position.X / 32, (int)position.Y / 32); Point endPoint = new Point((int)destination.X / 32, (int)destination.Y / 32); path = pathfinder.FindPath(startPoint, endPoint); pointCounter = 0; if (path != null) nextPoint = path[pointCounter]; dX = 0.0f; dY = 0.0f; stop = false; } private void Move(List<Unit> units) { if (nextPoint == position && !stop) { pointCounter++; if (pointCounter <= path.Count - 1) { nextPoint = path[pointCounter]; if (nextPoint == position) stop = true; } else if (pointCounter >= path.Count) { path.Clear(); pointCounter = 0; stop = true; } } else { if (!stop) { map.occupiedPoints.Remove(this); Flock(units); // Move in X ********* TOOK OUT SPEED ********** if ((int)nextPoint.X > (int)position.X) { position.X += dX; } else if ((int)nextPoint.X < (int)position.X) { position.X -= dX; } // Move in Y if ((int)nextPoint.Y > (int)position.Y) { position.Y += dY; } else if ((int)nextPoint.Y < (int)position.Y) { position.Y -= dY; } if (position == nextPoint && pointCounter >= path.Count - 1) stop = true; map.occupiedPoints.Add(this, position); } if (stop) { path.Clear(); pointCounter = 0; } } } private void Flock(List<Unit> units) { float distanceToNextPoint = Vector2.Distance(position, nextPoint); foreach (Unit unit in units) { float distance = Vector2.Distance(position, unit.position); if (unit != this) { if (distance < space && !leader && (nextPoint != position)) { // create space dX += (position.X - unit.position.X) * 0.1f; dY += (position.Y - unit.position.Y) * 0.1f; if (dX > .05f) nextPoint.X = nextPoint.X - dX; else if (dX < -.05f) nextPoint.X = nextPoint.X + dX; if (dY > .05f) nextPoint.Y = nextPoint.Y - dY; else if (dY < -.05f) nextPoint.Y = nextPoint.Y + dY; if ((dX < .05f && dX > -.05f) && (dY < .05f && dY > -.05f)) stop = true; path[pointCounter] = nextPoint; Console.WriteLine("Make Space: " + dX + ", " + dY); } else if (nextPoint != position && !stop) { dX = speed; dY = speed; Console.WriteLine(dX + ", " + dY); } } } } And here's the link to the pathfinder: https://docs.google.com/open?id=0B_Cqt6txUDkddU40QXBMeTR1djA I hope this post wasn't too long. Also please excuse the messiness of the code. As I said before this is early prototyping. Any help would be appreciated. Thanks!

    Read the article

  • Simple 3D games to make for learning 3D game development (Unity)

    - by Vandell
    I have some experience doing 2D games. But I struggle so much doing anything in Unity, so I'´ve decided to make some simple 3D games as a way to learn this 'new dimension' in game development but I'm having a hard time choosing games to clone (a task that's relatively easy to do for 2D). What games should a 2D developer make to break in 3D and why? I'd like also note that I have no problem with the scripting languages.

    Read the article

  • Designing Snake AI

    - by Ronald
    I'm new to this gamedev stackechange but have used the math and cs sites before. So, I'm in a competition to create AI for a snake that will compete with 3 other snakes in 5 minute rounds where the rules are much like the traditional Nokia snake game except that there are 4 snakes, the board is 50x50 and there are a number of small obstacles on the field. Like the Nokia game, your snake grows when you get to the fruit and if you crash into yourself, another snake or the wall you die. The game runs with a 50ms delay between moves and the server sends the new game state every 50ms which the code must analyze and what not and output the next move. The winner is the snake who had the longest length at any point in the game. Tie breakers are decided by kills. So far what I have done is implemented an A* graph search from each snake to determine if my snake is the closest to the apple and if it is, it goes for the apple. Otherwise, I made a neat little algorithm to determine the emptiest area of the board, which my snake goes for, to anticipate the next apple. Other than this I have some small survivability checks to ensure my snake isn't walking into a trap that it can't get out and if it does get stuck, I have something to give it a better chance of getting out. ... Anyway, I've tested my snake on a test server and it does quite well. Generally, my strategy of only going for the apple when its a sure thing and finding space when its not makes it grow faster than any other snakes (some snakes do a similar thing but often just go to the middle or a corner) sometimes it wins these trial games but is more often than not beaten by the same snake who seems to have the edge on survivability(my snake grows quicker but then dies somehow and this other snake just plods slowly along and wins on consistency. So I was wondering about any ideas anyone has to try and improve my snake. Or maybe ideas at a new approach to take. My functions and classes are good so changes that might seem drastic shouldn't be too bad. I encourage all ideas. Any thoughts ??

    Read the article

  • Better way to generate enemies of different sub-classes

    - by KDiTraglia
    So lets pretend I have an enemy class that has some generic implementation and inheriting from it I have all the specific enemies of my game. There are points in my code that I need to check whether an enemy is a specific type, but in Java I have found no easier way than this monstrosity... //Must be a better way to do this if ( enemy.class.isAssignableFrom(Ninja.class) ) { ... } My partner on the project saw these and changed them to use an enum system instead public class Ninja extends Enemy { //EnemyType is an enum containing all our enemy types public EnemyType = EnemyTypes.NINJA; } if (enemy.EnemyType = EnemyTypes.NINJA) { ... } I also have found no way to generate enemies on varying probabilities besides this for (EnemyTypes types : enemyTypes) { if ( (randomNext = (randomNext - types.getFrequency())) < 0 ) { enemy = createEnemy(types.getEnemyType()); break; } } private static Enemy createEnemy(EnemyType type) { switch (type) { case NINJA: return new Ninja(new Vector2D(rand.nextInt(getScreenWidth()), 0), determineSpeed()); case GORILLA: return new Gorilla(new Vector2D(rand.nextInt(getScreenWidth()), 0), determineSpeed()); case TREX: return new TRex(new Vector2D(rand.nextInt(getScreenWidth()), 0), determineSpeed()); //etc } return null } I know java is a little weak at dynamic object creation, but is there a better way to implement this in a way such like this for (EnemyTypes types : enemyTypes) { if ( (randomNext = (randomNext - types.getFrequency())) < 0 ) { //Change enemyTypes to hold the classes of the enemies I can spawn enemy = types.getEnemyType().class.newInstance() break; } } Is the above possible? How would I declare enemyTypes to hold the classes if so? Everything I have tried so far as generated compile errors and general frustration, but I figured I might ask here before I completely give up to the huge mass that is the createEveryEnemy() method. All the enemies do inherit from the Enemy class (which is what the enemy variable is declared as). Also is there a better way to check which type a particular enemy that is shorter than enemy.class.isAssignableFrom(Ninja.class)? I'd like to ditch the enums entirely if possible, since they seem repetitive when the class name itself holds that information.

    Read the article

  • Code for Controlling the Bike in a bike game

    - by user1489257
    I'm new(ish) to Actionscript 3 and I was wondering what the code what would be like for controlling the bike in a game. I have a two main questions: Is Box2D the best physics engine to go with for this type of game? How would the animation of the bike work. Would I have to create a bike animation of the wheels moving and make it start and stop when the key to go forward is pressed. How would I go about it slowly stopping when the key to go forward is released? Thanks.

    Read the article

  • Git: corrupt loose object

    - by NeoRiddle
    I was trying to merge my master branch with another one called pull-stage, but Git throws me this error: error: inflate: data stream error (invalid distance too far back) error: corrupt loose object '5a63450f4a0b72abbc1221ccb7d9f9bfef333250' fatal: loose object 5a63450f4a0b72abbc1221ccb7d9f9bfef333250 (stored in .git/objects/5a/63450f4a0b72abbc1221ccb7d9f9bfef333250) is corrupt How can I solve this issue? I have reviewed other posts, but with no successful results: How to replace corrupt Git objects with new ones created from my files, which are fine Git: "Corrupt loose object" Corrupted Git Repository (data stream error)

    Read the article

  • Random Quote in html using codeignitor

    - by user1503606
    I am getting random quotes in my html see image below, and i cant for the life of me figure out how to get rid of them i have traced it right back to my model and their are now quotes there, i have also compressed all my code and there is still quotes??? Any one had this bug??? heres my php <ul><?php foreach ($account_media as $value) : ?><li class="span2"></li>?<?php endforeach; ?></ul> i am using codeignitor

    Read the article

  • cURL gets response with utf-8 BOM

    - by Reshat Belyalov
    In my script I send data with cURL, and enabled CURLOPT_RETURNTRANSFER. The response is json encoded data. When I'm trying to json_decode, it returns null. Then I found that response contains utf-8 BOM symbols at the beginning of string (). There is some experiments: $data = $data = curl_exec($ch); echo $data; the result is {"field_1":"text_1","field_2":"text_2","field_3":"text_3"} $data = $data = curl_exec($ch); echo mb_detect_encoding($data); result - UTF-8 $data = $data = curl_exec($ch); echo mb_convert_encoding($data, 'UTF-8', mb_detect_encoding($data)); // identical to echo mb_convert_encoding($data, 'UTF-8', 'UTF-8'); result - {"field_1":"text_1","field_2":"text_2","field_3":"text_3"} The one thing that helps is removing first 3 symbols: if (substr($data, 0, 3) == pack('CCC', 239, 187, 191)) { $data = substr($data, 3); } But what if there will be another BOM? So the question is: How to detect right encoding of cURL response? OR how to detect what BOM has arrrived? Or maybe how to convert the response with BOM? Thanks.

    Read the article

  • What is the correct way to reference RDFa namespaces in HTML5?

    - by Eivind Eidheim Elseth
    I'm setting up a HTML5 webpage and want to include RDFa. I try checking the syntax with the w3 validator, and check the extracted RDF using the w3 RDFa distiller. When I declare namespaces using xmlns:<ns>="<uri>" the validator complains that the attribute is not allowed there, and the specs say that xmlns is deprecated, but if I try the other suggested prefix="<ns> <uri>" the distiller doesn't discover the RDFa embedded on my page. Which way should I stick to?

    Read the article

  • How can I solve the error while compiling the linux kernel 2.6.32.8

    - by user1182030
    while I was compiling the 2.6.32.8 linux kernel,I got the error message like this: In file included from drivers/net/igbvf/ethtool.c:36:0: drivers/net/igbvf/igbvf.h: At top level: drivers/net/igbvf/igbvf.h:128:15: error: duplicate member ‘page’ make[3]: *** [drivers/net/igbvf/ethtool.o] Error 1 make[2]: *** [drivers/net/igbvf] Error 2 make[1]: *** [drivers/net] Error 2 make: *** [drivers] Error 2 My version of gcc is 4.6.3 and I am using Ubuntu linux (the kernel I am using is 3.2.0.30).I've tried for times but failed,please help!

    Read the article

  • Codeigniter - selecting children and parents from db

    - by Tomek Buszewski
    I want to pull from my database records corresponding to parent_id, like this: function getChildren($id, $parent_id) { $q = $this->db->select('id, name, slug, plat'); $q = $this->db->from('games'); $q = $this->db->where('parent_id',$id); $q = $this->db->or_where('id',$parent_id); $q = $this->db->get(); return $q->result_array(); } It - if it's a children game - get parent_id and search for a game with such id and for other games that has parent_id same as this one. If it's the parent game, it only looks for games with parent_id same as it's id. The problem is... it's not always working. I have four games in db: id | parent_id | title 15 | 0 | Abe 19 | 15 | Abe 20 | 0 | RE2 21 | 20 | RE2 DS First two works, last two - only children (id = 21) shows parent.

    Read the article

  • A continued saga of C# interoprability with unmanaged C++

    - by Gilad
    After a day of banging my head against the wall both literally and metaphorically, I plead for help: I have an unmanaged C++ project, which is compiled as a DLL. Let's call it CPP Project. It currently works in an unmanaged environment. In addition, I have created a WPF project, that shall be called WPF Project. This project is a simple and currently almost empty project. It contains a single window and I want it to use code from Project 1. For that, I have created a CLR C++ project, which shall be called Interop Project and is also compiled as a DLL. For simplicity I will attach some basic testing code I have boiled down to the basics. CPP Project has the following two testing files: tester.h #pragma once extern "C" class __declspec(dllexport) NativeTester { public: void NativeTest(); }; tester.cpp #include "tester.h" void NativeTester::NativeTest() { int i = 0; } Interop Project has the following file: InteropLib.h #pragma once #include <tester.h> using namespace System; namespace InteropLib { public ref class InteropProject { public: static void Test() { NativeTester nativeTester; nativeTester.NativeTest(); } }; } Lastly, WPF Project has a single window refrencing Interop Project: MainWindow.xaml.cs using System; using System.Windows; using InteropLib; namespace AppGUI { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); InteropProject.Test(); } } } And the XAML itself has an empty window (default created). Once I am trying to run the WPF project, I get the following error: System.Windows.Markup.XamlParseException: 'The invocation of the constructor on type 'AppGUI.MainWindow' that matches the specified binding constraints threw an exception.' Line number '3' and line position '9'. --- System.IO.FileNotFoundException: Could not load file or assembly 'InteropLib.dll' or one of its dependencies. The specified module could not be found. at AppGUI.MainWindow..ctor() Interestingly enough, if I do not export the class from CPP Project, I do not get this error. Say, if i change tester.h to: #pragma once class NativeTester { public: void NativeTest() { int i = 0; } }; However, in this case I cannot use my more complex classes. If I move my implementation to a cpp file like before, I get unresolved linkage errors due to my not exporting my code. The C++ code I want to actually use is large and has many classes and is object oriented, so I can't just move all my implementation to the h files. Please help me understand this horrific error I've been trying resolve without success. Thanks.

    Read the article

  • char pointer array in c#

    - by james
    consider the following c++ code #include "stdafx.h" #include<iostream> using namespace std; void ping(int,char* d[]); void ping(int a,char *b[]) { int size; size=sizeof(b)/sizeof(int); // total size of array/size of array data type //cout<<size; for(int i=0;i<=size;i++) cout<<"ping "<<a<<b[i]<<endl; } int _tmain(int argc, _TCHAR* argv[]) { void (*funcptr)(int,char* d[]); char* c[]={"a","b"}; funcptr= ping; funcptr(10,c); return 0; } how can i implement the same in c#.. m new to c#. how can i have char pointer array in c#?

    Read the article

  • Java: Last access of 2D HashMap

    - by JamieFlowers
    I have the following structure: HashMap< String, HashMap< String, String Now i want to know the last accessed element in the 2nd dimension. I know there is TreeMap which makes sense in the 1rst dimension but after that it doesn't make any sense. How can I keep track of a 2D HashMap ordering? With access i mean: value = hashmap.get("a").get("1") value = hashmap.get("b").get("2") value = hashmap.get("c").get("3") hashmap.removeLast(); hashmap.removeLast(); hashmap.removeLast();

    Read the article

  • Exception: "Given final block not properly padded" in Linux, but it works in Windows

    - by user1685364
    My application works in windows, but fails in Linux with Given final block not properly padded exception. Configuration: JDK Version: 1.6 Windows : version 7 Linux : CentOS 5.8 64bit My code is below: import java.io.IOException; import java.io.UnsupportedEncodingException; import java.security.InvalidKeyException; import java.security.Key; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import javax.crypto.BadPaddingException; import javax.crypto.Cipher; import javax.crypto.IllegalBlockSizeException; import javax.crypto.KeyGenerator; import javax.crypto.NoSuchPaddingException; import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder; public class SecurityKey { private static Key key = null; private static String encode = "UTF-8"; private static String cipherKey = "DES/ECB/PKCS5Padding"; static { try { KeyGenerator generator = KeyGenerator.getInstance("DES"); String seedStr = "test"; generator.init(new SecureRandom(seedStr.getBytes())); key = generator.generateKey(); } catch(Exception e) { } } // SecurityKey.decodeKey("password") public static String decodeKey(String str) throws Exception { if(str == null) return str; Cipher cipher = null; byte[] raw = null; BASE64Decoder decoder = new BASE64Decoder(); String result = null; cipher = Cipher.getInstance(cipherKey); cipher.init(Cipher.DECRYPT_MODE, key); raw = decoder.decodeBuffer(str); byte[] stringBytes = null; stringBytes = cipher.doFinal(raw); // Exception!!!! result = new String(stringBytes, encode); return result; } } At the line: ciper.doFilnal(raw); the following exception is thrown: javax.crypto.BadPaddingException: Given final block not properly padded How can I fix this issue?

    Read the article

  • change php variable on click event

    - by Claudiu
    I want to change php variable ($start and $end called by var b1 and var b2) if the user clicks on button. Now I know that php is server side, but how can I do it? I read something about using $get but I don't know how to implement it: <?php if ( is_user_logged_in() ) { ?> <input type="submit" value="Start Chat" id="start_chat" style="position: absolute; top: 30px; left: 10px;" /> <?php } ?> <script> jQuery('#start_chat').click(function(){ $(this).data('clicked', true); }); var b1 = '<?php echo $start; ?>'; var b2 = '<?php echo $end; ?>'; if(jQuery('#start_chat').data('clicked')) { // change var b1 and b2 } else { // do not change anything } </script> <div id="eu_la"> <?php $start = strtotime('9:30'); $end = strtotime('12:30'); $timenow = date('U'); if((date('w') == 4) && ($timenow >= $start && $timenow <= $end)) { // day 2 = Tuesday include('facut_mine.php'); } else { do_shortcode('[upzslider usingphp=true]'); } ?>

    Read the article

  • how to create a progress bar using php output buffering and jquery?

    - by avien
    how to create a progress bar using php output buffering and jquery? i been searching this for weeks, i am desperate to learn this, this is a very big help for me, is someone the here share some codes? i know the this will need to script. i have tried sereval code for my client side script: var request = new XMLHttpRequest(); request.addEventListener("progress", updateProgress, false); function updateProgress(e) { var percent = (e.loaded / e.total) * 100; /** update the with of the progress bar **/ } and to my server side, i dont know how. but actually i want to use this for a mysql query so that i can see the progress of my query and another thing is i dont know how to use output buffering. somebody help me on this please.

    Read the article

  • how to repeat alarm week day on in android

    - by user1662296
    I want to get alarm on monday to friday only. my code is here if (chk_weekday.isChecked()) { int day = calNow.get(Calendar.DAY_OF_WEEK); if (day == 2 || day == 3 || day == 4 || day == 5 || day == 6) { alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, calSet.getTimeInMillis(), 1 * 60 * 60 * 1000, pendingIntent); } Have a Idea.

    Read the article

  • Prevent ASP.NET MVC Bundles Loading more than once

    - by Tim
    is there an inbuilt method of tracking if a bundle has already been loaded? I have several edit views which forexample require jquery and jquery.Validate etc libraries. Which i don't need to reference on the main layout page. Since a page could consist of several different conditional libraries ... ideally i would like @scripts.Render to know if i have already referenced a library and prevent its reloading. Cheers Tim

    Read the article

  • Jquery loads only after F5 in IE

    - by khushi
    I am using Jcrop jQuery to crop image in MVC3 application. following is my javacript function: jQuery(function ($) { $('#imgLab').Jcrop( { onChange: showCoords, onSelect: coordsSelected, onRelease: clearCoords } ); }); Image ID is 'imgLab'. Image src path is coming from database. Now this work fine in FF,Safari and Chrome. but in IE it only works after I press F5. Can anyone tell me what is wrong in code? Thanks in Advance. Khushbu

    Read the article

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