Daily Archives

Articles indexed Wednesday October 31 2012

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

  • UPDATE MANAGER UNABLE TO UPDATE

    - by muguro
    Requires installation of untrusted packages The action would require the installation of packages from not authenticated sources. i get this error every time i try updating. the system shows that it has 466 updates but fails after clicking update more details have this accountsservice apparmor apport apport-gtk apt apt-transport-https apt-utils aptdaemon aptdaemon-data at-spi2-core bamfdaemon base-files bcmwl-kernel-source bind9-host compiz compiz-core compiz-gnome compiz-plugins-default cron cups cups-bsd cups-client cups-common cups-filters cups-ppdc dbus dbus-x11 dconf-gsettings-backend dconf-service desktop-file-utils dmsetup dnsutils empathy empathy-common eog evince evince-common evolution-data-server evolution-data-server-common firefox firefox-globalmenu firefox-gnome-support firefox-locale-en fontconfig fontconfig-config fonts-liberation fonts-opensymbol foomatic-filters gcalctool gdb ghostscript ghostscript-cups ghostscript-x ginn gir1.2-atspi-2.0 gir1.2-dbusmenu-glib-0.4 gir1.2-dbusmenu-gtk-0.4 gir1.2-gst-plugins-base-0.10 gir1.2-gtk-3.0 gir1.2-gtksource-3.0 gir1.2-gudev-1.0 gir1.2-javascriptcoregtk-3.0 gir1.2-launchpad-integration-3.0 gir1.2-pango-1.0 gir1.2-rb-3.0 gir1.2-totem-1.0 gir1.2-ubuntuoneui-3.0 gir1.2-unity-5.0 gir1.2-webkit-3.0 glib-networking glib-networking-common glib-networking-services gnome-accessibility-themes gnome-control-center gnome-control-center-data gnome-desktop3-data gnome-games-data gnome-icon-theme gnome-media gnome-orca gnome-settings-daemon gnome-sudoku gnomine gnupg google-talkplugin gpgv grub-common grub-pc grub-pc-bin grub2-common gstreamer0.10-alsa gstreamer0.10-plugins-base gstreamer0.10-plugins-base-apps gstreamer0.10-x gvfs gvfs-backends gvfs-bin gvfs-common gvfs-daemons gvfs-fuse gvfs-libs gwibber gwibber-service gwibber-service-facebook gwibber-service-identica gwibber-service-twitter hdparm hplip hplip-data indicator-sound initscripts isc-dhcp-client isc-dhcp-common jockey-common jockey-gtk krb5-locales landscape-client-ui-install language-pack-en language-pack-en-base language-pack-gnome-en language-pack-gnome-en-base launchpad-integration libaccountsservice0 libapt-inst1.4 libapt-pkg4.12 libart-2.0-2 libasound2 libatspi2.0-0 libbamf0 libbamf3-0 libbind9-80 libc-bin libc-dev-bin libc6 libc6-dev libcairo-gobject2 libcairo2

    Read the article

  • favored keyboard layout keeps being replaced

    - by Johannes Bauer
    My Ubuntu was installed with only a German keyboard layout configured. I much prefer the English UK (extended WinKeys) layout and therefore added that option. However, the selected keyboard layout kept reverting to German seemingly at random, and so I removed it through the layout indicator's preferences dialog. Strangely that didn't help: every now and then the English keyboard layout is replaced by the German one and that change shows up in the layout indicator. I guess the unwanted layout must still be configured somewhere and I must be hitting some key combination to switch to it. But the preferences dialog for the layout indicator doesn't show any such combination. I'm on Ubuntu 12.04 and I'm using Xfce 4.8. PS: This is similar but not the same as this or this issue: when I log in, the correct layout is usually selected (and only that layout is configured). The layout is changed completely at random while I'm working.

    Read the article

  • No video signal after install

    - by tW4r
    Today I tried to install Ubuntu 12.10 to my machine, but all the time I encountered the same problem, I successfully boot from Ubuntu 12.04 DVD, and a purple background comes up with accessibility and keyboard icons at the bottom of the screen, then when you wait a while a monitor text comes up "No signal" (Keep in mind that this signal is only shown when there's cable in the monitor HDMI plug), and nothing happens, a little later disk drive stops flashing meaning that disk finished being read. Even if you reset the computer you still get no signal, you have to turn the power of and on again, and plug HDMI out and put it in again. My info: Graphics card: ATI/AMD Radeon HD 4850 Connection to monitor: HDMI Monitor: Samsung SyncMaster T220HD

    Read the article

  • Forwarding data between two interfaces

    - by user84471
    I installed Ubuntu server 12.04 after that I installed dhcp3-server and configured it like this: At isc-dhcp-server INTERFACES="eth0" And in dhcpd.conf # A slightly different configuration for an internal subnet. subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.5 192.168.1.100; option domain-name-servers 192.168.1.1; option domain-name "nazwa.local"; option routers 192.168.1.1; option broadcast-address 192.168.1.255; default-lease-time 600; max-lease-time 7200; } Also I have two eth interfaces: # second netowrk interface auto eth0 iface eth0 inet static address 192.168.1.1 netmask 255.255.255.0 # The primary network interface auto eth1 iface eth1 inet dhcp When I plug computer to eth0 I get propertly ip adress but I can't visit any sites. I do even this: echo 1 > /proc/sys/net/ipv4/ip_forward

    Read the article

  • Using portable Mode for true crypt for crypting Portable HDD , USB etc

    - by Gaurav_Java
    I was wondering how to encrypt my external HDD so that my data would be safe AND accessible from any OS platform (Windows and Linux). So I went through many posts and forums and found out the best thing was to use true crypt. I went along with this post and encrypt my USB drive. When inserted that, Windows didn't recognize it. Then I followed another post that said to install truecrypt. The thing is : How can i use traveler disk setup in Ubuntu (Option not found)? Install truecrypt in USB so that i can *mount my USB or HDD on any other OS? If there is no solution for the upper two, then is there any other software which I can use to encrypt an USB device so that it can be accessed from any OS?

    Read the article

  • Ubuntu hangs on booting up after a update

    - by alFReD NSH
    I've made a clean install yesterday, for the first time restarted, everything went good and then after I updated packages and copied my old home directory to replace the new one, when I restarted it hung when it was booting. I tried reinstalling again and doing the same thing, but again same thing happened. Here's what I see, before when the Ubuntu logo with the five dots is shown: Then after that, 3 or 4 of the dots will load and hangs there. If I press arrow up before that, this will be shown I started my laptop again today(the pictures are for the day before) and after that, boot up with live CD and got the logs. dmesg: http://pastebin.com/aVxV7BQF syslog: http://pastebin.com/4E2BrRUK And some info: alfred@alFitop:~$ uname -a Linux alFitop 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux lshw: http://pastebin.com/AZbKJmsT sources.list : http://pastebin.com/2HazmuyV My problem is a bit similar to here: http://ubuntuforums.org/showthread.php?t=1918271 Though I didn't change my x.org config. Only changed home directory and updated packages. I've tried memtest and fschk, both passed. In the recovery mode boot option, I've also realized that same things happen in failsafe graphical mode. But when I go into the network mode, I can boot up my system, but of course same the graphics are just basic. Adding blacklist intel_ips to /etc/modprobe.d/blacklist.conf solves the first message, but still I get the broken pipe and CPU stack traces. The current kernel version is 3.2.0-25, I've tried booting up in the 3.2.0-23(the one the installer came with, but same results.) Also uninstalled apparmor, didn't help. I've installed Ubuntu again, this time without copying the home directory, also same result. --- UPDATE --- This problem was solved before with removing backports, but its back again! I've updated my laptop last night and the problem came back. It's definitely one of these packages. My /var/log/apt/term.log and /var/log/apt/history.log. I'm almost having the same situation. --- UPDATE --- I realized this also have happened on times that I have updated(haven't restarted after it) and my computer power has been cut off and its shutdown due to lack of power. And I realized if I just do as I answered but not in somewhere without GUI(networking mode has the GUI) it wouldn't work.

    Read the article

  • Multilingual sites and Google search results, do subfolders really work?

    - by AWinter
    About three months ago we added an English version of our, previously Japanese only, site http://www.clubberia.com under the subfolder http://www.clubberia.com/en/ we've tried to follow the sometimes incomplete best practices laid out by Google by adding alternate tags to all pages that are currently translated. The top page for instance has the following meta tags for language. <link rel="canonical" href="/"> <link rel="alternate" hreflang="ja" href="/"> <link rel="alternate" hreflang="en" href="/en/"> While the English main page under /en/ has <link rel="canonical" href="/en/"> <link rel="alternate" hreflang="ja" href="/"> <link rel="alternate" hreflang="en" href="/en/"> We also have these alternate languages setup in the sitemap. (as per Google's recommendations) http://www.clubberia.com/sitemap.xml It seems however that Google absolutely refuses to show the English top page in results when the user is using English at google.com if you search for "clubberia" you'll, as of this post, get the Japanese description and a title that Google has apparently invented instead of the title and description in the meta-tags for the /en/ index page. Does anyone have any experience with subfolders actually working to affect search results? Am I being too impatient, or possibly doing something incorrect? Should we just give up on subfolders and push to subdomains (not the prettiest option)?

    Read the article

  • Wait till all CCActions have completed

    - by tGilani
    I am developing a simple cocos2d game in which I want to animate two CCSprites simultaneously, and for this purpose I simply set CCActions on respective `CCSprite's as follows. [first runAction:[CCMoveTo actionWithDuration:1 position:secondPosition]]; [second runAction:[CCMoveTo actionWithDuration:1 position:firstPosition]]; Now I want to wait till the animations are complete, so I can perform the next step. How should I wait for these animations to finish? There are actually two method calls, the first one animates the objects via the code above and second call does the other animation. I need to delay the second method call until the animations in first are complete. (I would not like to use CCCallFunc blocks as I want to call the second method from the same caller as the first one.

    Read the article

  • C# wpf helix scale based mesh parenting using Transform3DGroup

    - by Rick2047
    I am using https://helixtoolkit.codeplex.com/ as a 3D framework. I want to move black mesh relative to the green mesh as shown in the attached image below. I want to make green mesh parent to the black mesh as the change in scale of the green mesh also will result in motion of the black mesh. It could be partial parenting or may be more. I need 3D rotation and 3D transition + transition along green mesh's length axis for the black mesh relative to the green mesh itself. Suppose a variable green_mesh_scale causing scale for the green mesh along its length axis. The black mesh will use that variable in order to move along green mesh's length axis. How to go about it. I've done as follows: GeometryModel3D GreenMesh, BlackMesh; ... double green_mesh_scale = e.NewValue; Transform3DGroup forGreen = new Transform3DGroup(); Transform3DGroup forBlack = new Transform3DGroup(); forGreen.Children.Add(new ScaleTransform3D(new Vector3D(1, green_mesh_scale , 1))); // ... transforms for rotation n transition GreenMesh.Transform = forGreen ; forBlack = forGreen; forBlack.Children.Add(new TranslateTransform3D(new Vector3D(0, green_mesh_scale, 0))); BlackMesh.Transform = forBlack; The problem with this is the scale transform will also be applied to the black mesh. I think i just need to avoid the scale part. I tried keeping all the transforms but scale, on another Transform3DGroup variable but that also not behaving as expected. Can MatrixTransform3D be used here some how? Also please suggest if this question can be posted somewhere else in stackexchange.

    Read the article

  • My frustum culling is culling from the wrong point [SOLVED]

    - by Xbetas
    I'm having problems with my frustum being in the wrong origin. It follows the rotation of my camera but not the position. In my camera class I'm generating a view-matrix: void Camera::Update() { UpdateViewMatrix(); glMatrixMode(GL_MODELVIEW); //glLoadIdentity(); glLoadMatrixf(GetViewMatrix().m); } Then extracting the planes using the projection matrix and modelview matrix: void UpdateFrustum() { Matrix4x4 projection, model, clip; glGetFloatv(GL_PROJECTION_MATRIX, projection.m); glGetFloatv(GL_MODELVIEW_MATRIX, model.m); clip = model * projection; m_Planes[RIGHT][0] = clip.m[ 3] - clip.m[ 0]; m_Planes[RIGHT][1] = clip.m[ 7] - clip.m[ 4]; m_Planes[RIGHT][2] = clip.m[11] - clip.m[ 8]; m_Planes[RIGHT][3] = clip.m[15] - clip.m[12]; NormalizePlane(RIGHT); m_Planes[LEFT][0] = clip.m[ 3] + clip.m[ 0]; m_Planes[LEFT][1] = clip.m[ 7] + clip.m[ 4]; m_Planes[LEFT][2] = clip.m[11] + clip.m[ 8]; m_Planes[LEFT][3] = clip.m[15] + clip.m[12]; NormalizePlane(LEFT); m_Planes[BOTTOM][0] = clip.m[ 3] + clip.m[ 1]; m_Planes[BOTTOM][1] = clip.m[ 7] + clip.m[ 5]; m_Planes[BOTTOM][2] = clip.m[11] + clip.m[ 9]; m_Planes[BOTTOM][3] = clip.m[15] + clip.m[13]; NormalizePlane(BOTTOM); m_Planes[TOP][0] = clip.m[ 3] - clip.m[ 1]; m_Planes[TOP][1] = clip.m[ 7] - clip.m[ 5]; m_Planes[TOP][2] = clip.m[11] - clip.m[ 9]; m_Planes[TOP][3] = clip.m[15] - clip.m[13]; NormalizePlane(TOP); m_Planes[NEAR][0] = clip.m[ 3] + clip.m[ 2]; m_Planes[NEAR][1] = clip.m[ 7] + clip.m[ 6]; m_Planes[NEAR][2] = clip.m[11] + clip.m[10]; m_Planes[NEAR][3] = clip.m[15] + clip.m[14]; NormalizePlane(NEAR); m_Planes[FAR][0] = clip.m[ 3] - clip.m[ 2]; m_Planes[FAR][1] = clip.m[ 7] - clip.m[ 6]; m_Planes[FAR][2] = clip.m[11] - clip.m[10]; m_Planes[FAR][3] = clip.m[15] - clip.m[14]; NormalizePlane(FAR); } void NormalizePlane(int side) { float length = 1.0/(float)sqrt(m_Planes[side][0] * m_Planes[side][0] + m_Planes[side][1] * m_Planes[side][1] + m_Planes[side][2] * m_Planes[side][2]); m_Planes[side][0] *= length; m_Planes[side][1] *= length; m_Planes[side][2] *= length; m_Planes[side][3] *= length; } And check against it with: bool PointInFrustum(float x, float y, float z) { for(int i = 0; i < 6; i++) { if( m_Planes[i][0] * x + m_Planes[i][1] * y + m_Planes[i][2] * z + m_Planes[i][3] <= 0 ) return false; } return true; } Then i render using: camera->Update(); UpdateFrustum(); int numCulled = 0; for(int i = 0; i < (int)meshes.size(); i++) { if(!PointInFrustum(meshCenter.x, meshCenter.y, meshCenter.z)) { meshes[i]->SetDraw(false); numCulled++; } else meshes[i]->SetDraw(true); } Matrices look like (Camera is at (5, 0, 0)): ModelView [0,0,0.99,0] [0,1,0,0] [-0.99,0,0,0] [0,0,-5,1] Projection [0.814,0,0,0] [0,1.303,0,0] [0,0,-1,0] [0,0,-0.02,0] Clip [0,0,-1,-0.999] [0,1.30,0,0] [-0.814,0,0,0] [0,0,4.98,4.99] What am i doing wrong?

    Read the article

  • how to implement a game character task queue

    - by Stephen Lee Parker
    I'm working on a personal game engine in C# and need to give certain characters / sprites responses to conditions or certain patterns that they follow and since these patterns will be repeated over and over for other characters / sprites, I don't want to tie the patterns to the character / sprite. I will likely want to define the conditions / actions in level data files... I plan to use this for platformers, space shooters, and pack man like games... Almost an extenable AI system. Any suggestions on how this can be implemented?

    Read the article

  • A Form(?) appears briefly outside of Form1 when adding a control to it

    - by ispiro
    I have a program which creates new Controls (actually - Form's with TopLevel = false) and puts them on a Panel which is on Form1. For some reason, this is usually followed by what seems like a Form appearing very briefly outside of Form1. It's hard to tell exactly what's happening because it's so brief. Perhaps it's Form1 moving there (and changing its size) and then returning. Or perhaps it's the Form that's being put on Form1 that appears there (though how could that happen at all? It's out of Form1!). I couldn't find anything in the code that might cause it, and the whole code is way too long to post here. (The relevant code is simply: MyPanel.Controls.Add(newForm);.) Is there any known bug that might cause this?

    Read the article

  • subquery in join with doctrine dql

    - by Martijn de Munnik
    I want to use DQL to create a query which looks like this in SQL: select e.* from e inner join ( select uuid, max(locale) as locale from e where locale = 'nl_NL' or locale = 'nl' group by uuid ) as e_ on e.uuid = e_.uuid and e.locale = e_.locale I tried to use QueryBuilder to generate the query and subquery. I think they do the right thing by them selves but I can't combine them in the join statement. Does anybody now if this is possible with DQL? I can't use native SQL because I want to return real objects and I don't know for which object this query is run (I only know the base class which have the uuid and locale property). $subQueryBuilder = $this->_em->createQueryBuilder(); $subQueryBuilder ->addSelect('e.uuid, max(e.locale) as locale') ->from($this->_entityName, 'e') ->where($subQueryBuilder->expr()->in('e.locale', $localeCriteria)) ->groupBy('e.uuid'); $queryBuilder = $this->_em->createQueryBuilder(); $queryBuilder ->addSelect('e') ->from($this->_entityName, 'e') ->join('('.$subQueryBuilder.') as', 'e_')->join ->where('e.uuid = e_.uuid') ->andWhere('e.locale = e_.locale');

    Read the article

  • What happens if I just add a second IP to a domain?

    - by tntu
    We have two servers that are in constant sync. We have two applications that connect to them. Each app to different server. We devised a new version of those apps that will read a dns entry and get a list of IP addresses and try them in order. Now problem is old apps. We have noticed that some ppl still use the old ones even if we have released the new. If we were to add two IP's to each domain would they receive the IP's in the order we set them or random? Either way it will still work for us but I'm just curious. If first server goes offline will the client application try the other? To be noted for old version: Interruption does not affect in any way the continuation once connection is reestablished. Each communication is independent of previous ones. Applications connect at set intervals of time anywhere between 5 seconds to 1 hour. Connection is done simply using an http post to the URL in question.

    Read the article

  • PostgreSQL - select only when specific multiple apperance in column

    - by Horse SMith
    I'm using PostgreSQL. I have a table with 3 fields person, recipe and ingredient person = creator of the recipe recipe = the recipe ingredient = one of the ingredients in the recipe I want to create a query which results in every person who whenever has added carrot to a recipe, the person must also have added salt to the same recipe. More than one person can have created the recipe, in which case the person who added the ingredient will be credited for adding the ingredient. Sometimes the ingredient is used more than once, even by the same person. If this the table: person1, rec1, carrot person1, rec1, salt person1, rec1, salt person1, rec2, salt person1, rec2, pepper person2, rec1, carrot person2, rec1, salt person2, rec2, carrot person2, rec2, pepper person3, rec1, sugar person3, rec1, carrot Then I want this result: person1 Because this person is the only one who whenever has added carrot also have added salt.

    Read the article

  • Dealing with C++ web views

    - by Jeffrey
    I'm working, as an hobby (before any one rage out of their mind, I'm just trying to study C++ regarding something I love: web. I'm not trying to reinvent your precious wheel, and I'm not trying to create the new web technology. I just have the time to go for it.), creating a web CGI C++ library. I'm at a pretty good point, but in the future I see one big problem: views. I'm used to the great <body><?php echo "Hey!"; ?></body> embedded php, but there's no such thing in C++, so I'm wondering: How would you deal with views? Would you create a simple find-replace-variable templating system and deal with thousands of partial views? For example: View view; view.load("header.html"); view.load("nav.html"); view.load("post_start.html"); for (int i = 0; i < 10; i++) { std::map<std::string, std::string> post; Post p(i); post = p.get(); view.load(post_view.html, post); // p is passed as argument and every `{% varname %}` in the html will be replaced with its value inside the map } view.load(post_end.html); view.load(footer); Would you create a simple templating system? So that we can deal with this C++ code: std::vector<std::map<std::string, std::string>> posts; Posts p; posts = p.getAll(); view.load(posts.html, posts); and then this HTML/TPL: <html> ... <body> <h2> Posts </h2> {% for (i = 0; i < 10; i++): %} <div class="post">...</div> {% endfor %} </body> </html> Is there any other way? What is the best way to do this? (And no, I don't think this is subjective question)

    Read the article

  • How can I map to a field that is joined in via one of three possible tables

    - by Mongus Pong
    I have this object : public class Ledger { public virtual Person Client { get; set; } // .... } The Ledger table joins to the Person table via one of three possible tables : Bill, Receipt or Payment. So we have the following tables : Ledger LedgerID PK Bill BillID PK, LedgerID, ClientID Receipt ReceiptID PK, LedgerID, ClientID Payment PaymentID PK, LedgerID, ClientID If it was just the one table, I could map this as : Join ( "Bill", x => { x.ManyToOne ( ledger => ledger.Client, mapping => mapping.Column ( "ClientID" ) ); x.Key ( l => l.Column ( "LedgerID" ) ); } ); This won't work for three tables. For a start the Join performs an inner join. Since there will only ever be one of Bill, Receipt or Payment - an inner join on these tables will always return zero rows. Then it would need to know to do a Coalesce on the ClientID of each of these tables to know the ClientID to grab the data from. Is there a way to do this? Or am I asking too much of the mappings here?

    Read the article

  • I'm installing mysql with homebrew, how do I set value to 'log_output'?

    - by imjared
    I've been following directions here: brew install mysql on mac os and have now run into the same issue both on my home machine and work (both MacBook Pro running OSX 10.7.5 and ZSH): 121031 12:18:03 [ERROR] /usr/local/opt/mysql/bin/mysqld: Error while setting value '/Users/me/.mysql/logs/' to 'log_output' The full output of the error can be found in this gist: https://gist.github.com/3988275 I'm really at a loss for what I'm doing incorrectly or what I need to change. It should be noted that there are no logs for me to check in /usr/local/var/mysql. Any help is greatly appreciated.

    Read the article

  • Code to show UIPickerview under clicked UITextField

    - by Chris F
    I thought I'd share a code snippet where I show a UIPickerView when you click a UITextField. The code uses a UIPickerView, but there's no reason to use a different view controller, like a UITableViewController that uses a table instead of a picker. Just create a single-view project with a nib, and add a UITextField to the view and make you connections in IB. // .h file #import @interface MyPickerViewViewController : UIViewController <UIPickerViewDelegate, UIPickerViewDataSource, UITextFieldDelegate> - (IBAction)dismissPickerView:(id)sender; @end // .m file #import "MyPickerViewViewController.h" @interface MyPickerViewViewController () { UIPickerView *_pv; NSArray *_array; IBOutlet __weak UITextField *_tf; BOOL _pickerViewShown; } @end @implementation MyPickerViewViewController - (void)viewDidLoad { [super viewDidLoad]; _pickerViewShown = NO; _array = [NSArray arrayWithObjects:@"One", @"Two", @"Three", @"Four", nil]; _pv = [[UIPickerView alloc] initWithFrame:CGRectZero]; _pv.showsSelectionIndicator = YES; _pv.dataSource = self; _pv.delegate = self; _tf.delegate = self; _tf.inputView = _pv; } - (IBAction)dismissPickerView:(id)sender { [_pv removeFromSuperview]; [_tf.inputView removeFromSuperview]; [_tf resignFirstResponder]; _pickerViewShown = NO; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField { if (!_pickerViewShown) { [self setRectForPickerViewRelativeToTextField:textField]; [self.view addSubview:_tf.inputView]; _pickerViewShown = YES; } else { [self dismissPickerView:self]; } return NO; } - (void)setRectForPickerViewRelativeToTextField:(UITextField*)textField { CGFloat xPos = textField.frame.origin.x; CGFloat yPos = textField.frame.origin.y; CGFloat width = textField.frame.size.width; CGFloat height = textField.frame.size.height; CGFloat pvHeight = _pv.frame.size.height; CGRect pvRect = CGRectMake(xPos, yPos+height, width, pvHeight); _pv.frame = pvRect; } - (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component { return [_array objectAtIndex:row]; } - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView { return 1; } - (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component { return _array.count; } - (void) pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { _tf.text = [_array objectAtIndex:row]; [self dismissPickerView:self]; } @end

    Read the article

  • cvRetrieveFrame crahses

    - by pooh_bear
    I'm trying to write a simple openCV code that create a capture and retrieves the first frame from it. **CvCapture *m_pCapfile = cvCreateFileCapture(m_aviFileName.c_str()); if (m_pCapfile) m_frames = cvRound(cvGetCaptureProperty(m_pCapfile, CV_CAP_PROP_FRAME_COUNT)); cvSetCaptureProperty(m_pCapfile, CV_CAP_PROP_POS_FRAMES, 0); int ret = cvGrabFrame( m_pCapfile); IplImage *cap = cvRetrieveFrame( m_pCapfile);** In m_frames is have 153, which is the correct number of frames as far as I know. cvGrabFrame returns 1 to ret however cvRetrieveFrame crashes. I tries using cvCaptureFromFile and cvCaptureFromAVI instead of cvCreateFileCapture In both cases cvRetrieveFrame method crashes. Any ideas? Thanks

    Read the article

  • How can I pull another repository and update to its head in GIT?

    - by mark
    Here is the description of the problem in terms of Mercurial: Given: Two repos A and B, where B is a fork of A The current directory is a working directory for the tip of A. Needed: Pull in B and update to its most recent head REV. This is what I want to do in term of Mercurial: A> hg pull B A> hg heads # Notice the most recent head of B A> hg update **REV** How can I do it in GIT? More concretely: A is the master branch of https://github.com/yui/yui3-gallery.git B is the master branch of https://github.com/jafl/yui3-gallery.git I need to update to the most recent revision of B, when I have a local clone of A I know it should be trivial, still I cannot figure it out. Anyone?

    Read the article

  • jQuery selector after dynamically created element

    - by Bryan Williams
    I am trying to get an dynamically created element using a jQuery selector but it is returning an empty array. The first thing I am doing is grabbing an empty div: var packDiv = document.getElementById('templates'); packDiv.innerHTML = ""; then adding items to it in a loop: packDiv.innerHTML = packDiv.innerHTML + "<img id='" + thumbName + "' src='thumbs/" + thumbName + "'/>"; after the loop finishes I try to select an item using: console.log($("#"+thumbName)); and it returns the empty array. All the things I search on show to use .on but all the examples show that is to set event handlers. My question is how do I format a selector for dynamically created elements?

    Read the article

  • hash table with chaining method program freezing

    - by Justin Carrey
    I am implementing hash table in C using linked list chaining method. The program compiles but when inserting a string in hash table, the program freezes and gets stuck. The program is below: struct llist{ char *s; struct llist *next; }; struct llist *a[100]; void hinsert(char *str){ int strint, hashinp; strint = 0; hashinp = 0; while(*str){ strint = strint+(*str); } hashinp = (strint%100); if(a[hashinp] == NULL){ struct llist *node; node = (struct llist *)malloc(sizeof(struct llist)); node->s = str; node->next = NULL; a[hashinp] = node; } else{ struct llist *node, *ptr; node = (struct llist *)malloc(sizeof(struct llist)); node->s = str; node->next = NULL; ptr = a[hashinp]; while(ptr->next != NULL){ ptr = ptr->next; } ptr->next = node; } } void hsearch(char *strsrch){ int strint1, hashinp1; strint1 = 0; hashinp1 = 0; while(*strsrch){ strint1 = strint1+(*strsrch); } hashinp1 = (strint1%100); struct llist *ptr1; ptr1 = a[hashinp1]; while(ptr1 != NULL){ if(ptr1->s == strsrch){ cout << "Element Found\n"; break; } else{ ptr1 = ptr1->next; } } if(ptr1 == NULL){ cout << "Element Not Found\n"; } } hinsert() is to insert elements into hash and hsearch is to search an element in the hash. Hash function is written inside hinsert() itself. In the main(), what i am initializing all the elements in a[] to be NULL like this: for(int i = 0;i < 100; i++){ a[i] = NULL; } Help is very much appreciated. Thanks !

    Read the article

  • Event Dispatching, void pointer and alternatives

    - by PeeS
    i have my event dispatching / handling functionality working fine, but there is one issue that i need to resolve. Long story short, here are the details. // The event structure struct tEventMessage { // Type of the event int Type; // (void*) Allows those to be casted into per-Type objects void *pArgument1; void *pArgument2; }; I am sending events from different modules in my engine by using the above structure, which requires a pointer to an argument. All messages are queued, and then dispatched on the next ::Tick(). It works fine, untill i try to send something that doesn't exist in next ::Tick, for example: When a mouse click is being handled, it calculates the click coordinates in world space. This is being sent with a pointer to a vector representing that position, but after my program quits that method, this pointer gets invalid obviously, cause local CVector3 is destructed: CVector2 vScreenSpacePosition = vAt; CVector3 v3DPositionA = CVector3(0,0,0); CVector3 v3DPositionB = CVector3(0,0,0); // Screen space to World space calculation for depth zNear v3DPositionA = CMath::UnProject(vScreenSpacePosition, m_vScreenSize, m_Level.GetCurrentCamera()->getViewMatrix(), m_Level.GetCurrentCamera()->getProjectionMatrix(), -1.0 ); // Screen space to World space calculation for depth zFar v3DPositionB = CMath::UnProject(vScreenSpacePosition, m_vScreenSize, m_Level.GetCurrentCamera()->getViewMatrix(), m_Level.GetCurrentCamera()->getProjectionMatrix(), 1.0); // Send zFar position and ScreenSpace position to the handlers // Obviously both vectors won't be valid after this method quits.. CEventDispatcher::Get()->SendEvent(CIEventHandler::EVENT_SYSTEM_FINGER_DOWN, static_cast<void*>(&v3DPositionB), static_cast<void*>(&vScreenSpacePosition)); What i want to ask is, if there is any chance i could make my tEventMessage more 'template', so i can handle sending objects like in the above situation + use what is already implemented? Can't figure it out at the moment.. What else can be done here to allow me to pass some locally available data ? Please can somebody shed a bit of light on this please?

    Read the article

  • Load Globalize cultures with Node.js?

    - by Xeon06
    I'm using jQuery Globalize with Node.js. They have a package.json file so I can simply use it as a module and require it. However, it doesn't load all cultures by default. I was wondering what the proper way to load a culture would be? I could go and do something like require('./node_modules/globalize/lib/cultures/globalize.culture.es-US.js') and load the file directly, but that doesn't seem too elegant. Is there a "proper" way to do this?

    Read the article

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