Daily Archives

Articles indexed Saturday November 3 2012

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

  • Reading mp3 metadata?

    - by Blaze
    I am planing on writing an application using Vala. Its purposed is to import mp3 files from a location and rename them if necessary. The renaming information should be provided by the ID3 tags in the mp3 file such as the title and the number of the song. My target platform is Ubuntu (Linux). As the question says, I am searching for how can I achieve this on Vala. I think this functionality might be provided by Gstreamer.

    Read the article

  • Why are source control systems still mostly backed with files?

    - by Andy
    It seems that more source control systems still use files as the means of storing the version data. Vault and TFS use Sql Server as their data store, which I would think would be better for data consistency as well as speed. So why is it that SVN, I believe GIT, CVS, etc still use the file system as essentially a database, (I ask this question as we had our SVN server just corrupt itself during a normal commit) instead of using actual database software (MSSQL, Oracle, Postgre, etc)?

    Read the article

  • Hover alternatve for touch devices [migrated]

    - by Joshua Frank
    I'm building a standard infographic where you mouse over a region and the image changes as you move. For instance, imagine a map of the world, and when you mouse over a country, that country glows and a panel shows statistics about that country. The implementation is to have a separate image for the glowing country, and a div element with the statistics, and the code shows these additional elements on a hover over the country. The question is: what should this do on a tablet, where there's no hover event? What's a good alternative navigation metaphor for this kind of situation on touch-only devices?

    Read the article

  • Which numeral systems are useful in computer science?

    - by authchir
    I am wondering which numeral system different programmers are using, or would use if their language has support for them. As an example, in C++ we can use: Octal by prefixing with 0 (e.g. 0377) Decimal by default (e.g. 255) Hexadecimal by prefixing with 0x (e.g. 0xff) When working with bitmask, I am using hexadecimal but would sometimes want to be able to express binary numbers directly. I know some programming language support it with 0b syntax (e.g. 0b11111111). Is there any other numeric system useful in some computer science domain (e.g. cryptography, codecs, 3D graphics, etc)?

    Read the article

  • How to get started with programming

    - by S.M.
    I have never programmed before. In the 5th grade, I did write very elementary programs using BASIC and that was 7 year back. I wish to learn how to program and I was wondering if someone could please suggest how to get started. For example, I do not know enough to form a judgement on what language should be appropriate to get started. What programming language would you suggest to get started with programming? What are the resources to learn the language you recommend.

    Read the article

  • Is C# freelance possible? [closed]

    - by Chelios
    I am currently a junior C# developer. C# lets me write a big variety of all kinds of programs: I can create standalone programs aswell as websites. But I would like to do some freelance after I get good C# skills. Does C#/.NET (basically, all the Microsoft platmorm: ASP.NET, ADO.NET, MS SQL server) demand in the freelance world? Is it effective to freelance as C# developer? By effective I mean easy to find customers and good money. Thanks!

    Read the article

  • Can python and php work together?

    - by user71741
    I am having a mobile app created for ios. The developers built the app in php. The app requires an algorithm so I found another programmer to develop it. The algorithm programmer built the algorithm in python. The developers refuse to finish the app because they say it won't work with python, while the programmer insist it will. The programmer says put the algorithm in its on server and connect then over http. Will this work and I'd so how risky is it to future problems?

    Read the article

  • Problem inserting in two different tables [closed]

    - by imvarunkmr
    I have written an insert statement which inserts a record into Table1. Table1 has a column "ID" which is an auto_increment(Identity) primary key. How can I fetch the newly generated "ID" and as I need to Insert this value as foreign key in Table2? Note : I have written INSERT statement in a stored procedure and I am calling this procedure using C# Alternative suggestions to link both tables are also welcomed :)

    Read the article

  • Which platform to choose, Java or .NET?

    - by salman
    I am working in a private bank, a leading mid size bank in local market. We are going to create our core banking solution. Existing solution has been developed on Java using IBM Visual Age 4.0. It is very important to discuss architecture first, we have currently more than 350 branches working in standalone mode, and it means they are working in self contained environment. They have their own database server (IBM DB2 9.7) and they are communicating with other branches via sockets to send and receive data. Having experience of .NET for more than 5 years I am trying to convince my superiors to choose .NET platform, but they are reluctant and unwilling. It is my job to encourage them for choosing best available platform to create large scale enterprise application. In simple word, we are going to create a very large scale enterprise financial application, a centralize and integrated which connects all branch networks plus having scalable, solid architecture that easily evolve over time. I want professional people to comment on above scenarios. Which platform to choose .NET or Java? Our all resource is currently working in Java, we have homogeneous environment (no Linux, no Mac and no UNIX). Any idea, any thoughts, any points technical or non-technical i.e. administrative or management point of view will be really appreciated.

    Read the article

  • 12.04 scanner works fine as super-user but is not recognised as a normal user

    - by Eugénio Outeiro
    I have an all-in-one printer Epson SX130, wich I have just tried to install. I got the printer working with no problem, but I couldn't set the scanner up. I have had another all-in-one printer before (Brother DCP-125C), and had just the same problem, so I decided to try the same trick I used to do then, running the scanning program as super-user: $sudo simple-scan and $ sudo xsane Once again, it worked just fine, and I could use the scanner. Anyhow, this solution is a little annoying, because I also have to change the permissions to the files I get scanning like this. I have been searching the internet for solutions and got to know this must have something to do with user groups permissions, but couldn't find a satisfying solution. Is there anyone with an idea? Thank you in advance.

    Read the article

  • What is the package name for JVM?

    - by JohnMerlino
    If I want to know if skype is installed, I would type this: viggy@ubuntu:~$ apt-cache policy skype skype:i386: Installed: 4.0.0.8-1 Candidate: 4.0.0.8-1 Version table: *** 4.0.0.8-1 0 100 /var/lib/dpkg/status Or if Eclipse is installed: viggy@ubuntu:~$ apt-cache policy eclipse eclipse: Installed: (none) Candidate: 3.7.2-1 Version table: 3.7.2-1 0 But let's say I want to know if the Java Virtual Machine is installed. How would I know what to pass to apt-cache policy? For example, you might not know what to pass to apt-cache policy for some programs: viggy@ubuntu:~$ apt-cache policy java N: Unable to locate package java viggy@ubuntu:~$ apt-cache policy JVM N: Unable to locate package JVM

    Read the article

  • Unable to change user password in Ubuntu 12.10

    - by Laphanga
    The User Password is not changing for some reason. In the terminal it says password updated successfully, $ sudo passwd [sudo] password for zaigham: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully But when I try to log in using the new password it doesn't work. I have changed my password 2, 3 times now but still it's the same. Is that some kind of bug?

    Read the article

  • trying to setup wireless

    - by JohnMerlino
    I'm trying to set up wireless on vostro 1520 dell laptop, with latest Ubuntu install. Here's the output of some of the commands that I was told to run: lshw -C network viggy@ubuntu:~$ lshw -C network WARNING: you should run this program as super-user. *-network description: Ethernet interface product: RTL8111/8168B PCI Express Gigabit Ethernet controller vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:08:00.0 logical name: eth0 version: 03 serial: 00:24:e8:da:84:25 size: 100Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: bus_master cap_list rom 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/rtl8168d-1.fw ip=192.168.2.6 latency=0 multicast=yes port=MII speed=100Mbit/s resources: irq:47 ioport:3000(size=256) memory:f6004000-f6004fff memory:f6000000-f6003fff memory:f6020000-f603ffff *-network description: Network controller product: BCM4312 802.11b/g LP-PHY vendor: Broadcom Corporation physical id: 0 bus info: pci@0000:0e:00.0 version: 01 width: 64 bits clock: 33MHz capabilities: bus_master cap_list configuration: driver=b43-pci-bridge latency=0 resources: irq:18 memory:fa000000-fa003fff *-network DISABLED description: Wireless interface physical id: 1 logical name: wlan0 serial: 0c:60:76:05:ee:74 capabilities: ethernet physical wireless configuration: broadcast=yes driver=b43 driverversion=3.2.0-29-generic firmware=N/A multicast=yes wireless=IEEE 802.11bg lspci 00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07) 00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) 00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) 00:1a.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03) 00:1a.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03) 00:1a.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03) 00:1a.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03) 00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03) 00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03) 00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03) 00:1c.2 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 3 (rev 03) 00:1c.3 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 4 (rev 03) 00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 03) 00:1c.5 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 6 (rev 03) 00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03) 00:1d.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03) 00:1d.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03) 00:1d.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03) 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93) 00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03) 00:1f.2 SATA controller: Intel Corporation 82801IBM/IEM (ICH9M/ICH9M-E) 4 port SATA Controller [AHCI mode] (rev 03) 00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03) 08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03) 0e:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g LP-PHY (rev 01) 1a:00.0 FireWire (IEEE 1394): O2 Micro, Inc. Device 10f7 (rev 01) 1a:00.1 SD Host controller: O2 Micro, Inc. Device 8120 (rev 01) 1a:00.2 Mass storage controller: O2 Micro, Inc. Device 8130 (rev 01) iwconfig lo no wireless extensions. wlan0 IEEE 802.11bg ESSID:off/any Mode:Managed Access Point: Not-Associated Tx-Power=0 dBm Retry long limit:7 RTS thr:off Fragment thr:off Power Management:on eth0 no wireless extensions. At this point in time, I don't have wireless.

    Read the article

  • Which version control system to use?

    - by deshmukh
    I am looking at using a version control system to ensure that I can go back in time to a particular version for all documents in ~, if I have to. What is the best suited tool for this given that: I am without much experience in version control systems Several files will be plain text files but there will be some Libre-Office files also The tool should: Be easy to set-up, run and maintain Have easy to understand configuration options (what directories to track, for how long, how frequently the changes should be captured, etc.) Ideally have a GUI front also Be able to recover deleted files What is the best/ most widely used tool that will be suitable for me?

    Read the article

  • changing system terminal colours?

    - by user88561
    So I have my computer set up just the way I want, with gnome 3 in my favorite color scheme, and the terminal in a matching background/text color scheme. Even the login screen has my Desktop background. However it is a little jarring when I shut down/use grubby and its in the default maroon and white scheme. Is there any way to change this to make it more similar to my own color scheme in terminal?

    Read the article

  • What is the *right* way to use gnome-shell integrated chat?

    - by stevejb
    Please bear with me as I am still figuring out how to use gnome-shell. My question concerns how to use the integrated chat correctly. I have the following questions: 1) When people chat with me, it pops up as a notification on the hidden bar at the bottom of the screen, and then that chat stays there so I can access it later. How do I initiate a chat in this manner, without opening an empathy window? What I have been doing is Hitting super key Typing in the person's name, which brings up contacts Initiate the chat using empathy Immediately close the chat window When the person responds, it comes through as a notification. I then proceed to interact with the chat this way. 2) What is the keyboard shortcut for bringing up the notifications bar? Ideally, I would like to have the following experience Use some keyboard shortcut to bring up notifications Begin typing the name of the notification that I wish to investigate, and have the matching work in a fuzzy manner, much like Ido mode's buffer switching matching in Emacs When then right name is matched, I hit enter and then bring up the chat with that person as that popup notification. Are these behaviours supported? If not, I would be happy to work on implementing them. I am an experienced programmer, but not familiar with gnome-shell. If someone would point me in the right direction in terms of if this behaviour is supported, or where in the gnome-shell framework would I add to to get this behaviour, I would really appreciate it. Thanks!

    Read the article

  • Simple 2d game pathfinding

    - by Kooi Nam Ng
    So I was trying to implement a simple pathfinding on iOS and but the outcome seems less satisfactory than what I intended to achieve.The thing is units in games like Warcraft and Red Alert move in all direction whereas units in my case only move in at most 8 directions as these 8 directions direct to the next available node.What should I do in order to achieve the result as stated above?Shrink the tile size? The screenshot intended for illustration. Those rocks are the obstacles whereas the both ends of the green path are the starting and end of the path.The red line is the path that I want to achieve. http://i.stack.imgur.com/lr19c.jpg

    Read the article

  • 2-components color model

    - by Cyan
    RGB is the natural color model for OpenGL. But a lot of other color models exist. For example, CMY(K) for printers, YUV for JPEG, the little cousins YCbCr and YCoCg, HSL & HSV from the 70's, and so on. All these models tend to share a common property : they are based on 3 components. Therefore my question is : Does it exist a 2-components color model ? I'm surprised to not find any. I was expecting something along the line of Hue+light could exist. I guess it cannot be as "complete" as a true 3-components color model, but a fine-enough approximation will be good for my usecase. The end objective is to store the 2 components into a single BC5 texture (GL_COMPRESSED_RED_GREEN_RGTC2 in OpenGL). The 3rd component requires a second fetch into a second texture, which hurts performance.

    Read the article

  • Foreach loop with 2d array of objects

    - by Jacob Millward
    I'm using a 2D array of objects to store data about tiles, or "blocks" in my gameworld. I initialise the array, fill it with data and then attempt to invoke the draw method of each object. foreach (Block block in blockList) { block.Draw(spriteBatch); } I end up with an exception being thrown "Object reference is not set to an instance of an object". What have I done wrong? EDIT: This is the code used to define the array Block[,] blockList; Then blockList = new Block[screenRectangle.Width, screenRectangle.Height]; // Fill with dummy data for (int x = 0; x <= screenRectangle.Width / texture.Width; x++) { for (int y = 0; y <= screenRectangle.Height / texture.Width; y++) { if (y >= screenRectangle.Height / (texture.Width*2)) { blockList[x, y] = new Block(1, new Rectangle(x * 16, y * 16, texture.Width, texture.Height), texture); } else { blockList[x, y] = new Block(0, new Rectangle(x * 16, y * 16, texture.Width, texture.Height), texture); } } }

    Read the article

  • Java ByteBuffer to VB .NET

    - by user1797258
    I have this java code : ByteBuffer p = ByteBuffer.allocate(packet.length - 10 + 14); p.order(ByteOrder.LITTLE_ENDIAN); p.putInt(packet.length); p.putInt(packet.request_id); p.putInt(packet.type); p.put(packet.paylod); p.put((byte) 0); p.put((byte) 0); And i want to translate it to VB .NET I started with this : Dim p(packet.length - 10 + 14) As Byte But after i dont know how to put these variables in the right way

    Read the article

  • How small is *too small* for an opensource project?

    - by Adam Lewis
    I have a fair number of smaller projects / libraries that I have been using over the past 2 years. I am thinking about moving them to Google Code to make it easier to share with co-workers and easier to import them into new projects on my own environments. The are things like a simple FSMs, CAN (Controller Area Network) drivers, and GPIB drivers. Most of them are small (less than 500 lines), so it makes me wonder are these types of things too small for a stand alone open-source project? Note that I would like to make it opensource because it does not give me, or my company, any real advantage.

    Read the article

  • Android ProgressDialog inside another dialog

    - by La bla bla
    I'm working on a game using AndEngine, and I need to show the users the list of his Facebook friends. I've created my custom Adatper and after the loading finishes everything works great. I have a problem with the loading it self. The ListView is inside a custom dialog, since I don't really know how to create one using AndEngine, So inside this dialog, I'm running an AsyncTask to fetch the friends' info, in that AsyncTask I'm have a ProgressDialog. The problem is, the ProgressDialog shows up behind the dialog that contains the to-be list (which while loading, is just the title). I can see the ProgressDialog "peeking" behind that dialog.. Any Ideas? Here's some code: FriendsDialog.java private ProgressDialog dialog; //Constructor of the AsyncTask public FriendsLoader(Context context) { dialog = new ProgressDialog(context); dialog.setMessage("Please wait..\nLoading Friends List."); } @Override protected void onPreExecute() { dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); dialog.setView(inflater.inflate(R.layout.loading, null)); dialog.setMessage("Please wait..\nLoading friends."); dialog.show(); } @Override protected void onPostExecute(ArrayList<HashMap<String, Object>> data) { if (dialog.isShowing()) { dialog.dismiss(); } MyAdapter myAdapter = new MyAdapter(context, data); listView = (ListView) findViewById(R.id.list); listView.setAdapter(myAdapter); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> myAdapter, View myView, int myItemInt, long mylng) { String id = (String) listView.getItemAtPosition(myItemInt); listener.onUserSelected(id); dismiss(); } }); }

    Read the article

  • PHP Facebook Cronjob with offline access

    - by Mohamed Salem
    1:the code to greet the user, ask for his permission and store his session data so that we can use a cronjob with his session data afterwards. <?php $db_server = "localhost"; $db_username = "username"; $db_password = "password"; $db_name = "databasename"; #go to line 85, the script actually starts there mysql_connect($db_server,$db_username,$db_password); mysql_select_db($db_name); #you have to create a database to store session values. #if you do not know what columns there should be look at line 76 to see column names. #make them all varchars # Now lets load the FB GRAPH API require './facebook.php'; // Create our Application instance. global $facebook; $facebook = new Facebook(array( 'appId' => '121036530138', 'secret' => '9bbec378147064', 'cookie' => false,)); # Lets set up the permissions we need and set the login url in case we need it. $par['req_perms'] = "friends_about_me,friends_education_history,friends_likes, friends_interests,friends_location,friends_religion_politics, friends_work_history,publish_stream,friends_activities, friends_events, friends_hometown,friends_location ,user_interests,user_likes,user_events, user_about_me,user_status,user_work_history,read_requests, read_stream,offline_access,user_religion_politics,email,user_groups"; $loginUrl = $facebook->getLoginUrl($par); function save_session($session){ global $facebook; # OK lets go to the database and see if we have a session stored $sid=mysql_query("Select access_token from facebook_user WHERE uid =".$session['uid']); $session_id=mysql_fetch_row($sid); if (is_array($session_id)) { # We have a stored session, but is it valid? echo " We have a session, but is it valid?"; try { $attachment = array('access_token' => $session_id[0]); $ret_code=$facebook->api('/me', 'GET', $attachment); } catch (Exception $e) { # We don't have a good session so echo " our old session is not valid, let's delete saved invalid session data "; $res = mysql_query("delete from facebook_user WHERE uid =".$session['uid']); #save new good session #to see what is our session data: print_r($session); if (is_array($session)) { $sql="insert into facebook_user (session_key,uid,expires,secret,access_token,sig) VALUES ('".$session['session_key']."','".$session['uid']."','". $session['expires']."','". $session['secret'] ."','" . $session['access_token']."','". $session['sig']."');"; $res = mysql_query($sql); return $session['access_token']; } # this should never ever happen echo " Something is terribly wrong: Our old session was bad, and now we cannot get the new session"; return; } echo " Our old stored session is valid "; return $session_id[0]; } else { echo " no stored session, this means the user never subscribed to our application before. "; # let's store the session $session = $facebook->getSession(); if (is_array($session)) { # Yes we have a session! so lets store it! $sql="insert into facebook_user (session_key,uid,expires,secret,access_token,sig) VALUES ('".$session['session_key']."','".$session['uid']."','". $session['expires']."','". $session['secret'] ."','". $session['access_token']."','". $session['sig']."');"; $res = mysql_query($sql); return $session['access_token']; } } } #this is the first meaningful line of this script. $session = $facebook->getSession(); # Is the user already subscribed to our application? if ( is_null($session) ) { # no he is not #send him to permissions page header( "Location: $loginUrl" ); } else { #yes, he is already subscribed, or subscribed just now #in case he just subscribed now, save his session information $access_token=save_session($session); echo " everything is ok"; # write your code here to do something afterwards } ?> error Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/28/9687528/html/ss/src/indexx.php:1) in /home/content/28/9687528/html/ss/src/facebook.php on line 49 Fatal error: Call to undefined method Facebook::getSession() in /home/content/28/9687528/html/ss/src/indexx.php on line 86 2:A cronjob template that reads the stored session of a user from database, uses his session data to work on his behalf, like reading status posts or publishing posts etc. <?php $db_server = "localhost"; $db_username = "username"; $db_password = "pass"; $db_name = "database"; # Lets connect to the Database and set up the table $link = mysql_connect($db_server,$db_username,$db_password); mysql_select_db($db_name); # Now lets load the FB GRAPH API require './facebook.php'; // Create our Application instance. global $facebook; $facebook = new Facebook(array( 'appId' => 'appid', 'secret' => 'secret', 'cookie' => false, )); function get_check_session($uidCheck){ global $facebook; # This function basically checks for a stored session and if we have one it returns it # OK lets go to the database and see if we have a session stored $sid=mysql_query("Select access_token from facebook_user WHERE uid =".$uidCheck); $session_id=mysql_fetch_row($sid); if (is_array($session_id)) { # We have a session # but, is it valid? try { $attachment = array('access_token' => $session_id[0],); $ret_code=$facebook->api('/me', 'GET', $attachment); } catch (Exception $e) { # We don't have a good session so echo " User ".$uidCheck." removed the application, or there is some other access problem. "; # let's delete stored data $res = mysql_query("delete from facebook_user where WHERE uid =".$uidCheck); return; } return $session_id[0]; } else { # "no stored session"; echo " error:newsFeedcrontab.php No stored sessions. This should not have happened "; } } # get all users that have given us offline access $users = getUsers(); foreach($users as $user){ # now for each user, check if they are still subscribed to our application echo " Checking user".$user; $access_token=get_check_session($user); # If we've not got an access_token we actually need to login. # but in the crontab, we just log the error, there is no way we can find the user to give us permission here. if ( is_null($access_token) ) { echo " error: newsFeedcrontab.php There is no access token for the user ".$user." "; } else { #we are going to read the newsfeed of user. There are user's friends' posts in this newsfeed try{ $attachment = array('access_token' => $access_token); $result=$facebook->api('/me/home', 'GET', $attachment); }catch(Exception $e){ echo " error: newsfeedcrontab.php, cannot get feed of ".$user.$e; } #do something with the result here #but what does the result look like? #go to http://developers.facebook.com/docs/reference/api/user/ and click on the "home" link under connections #we can also read the home of user. Home is the wall of the user who has given us offline access. try{ $attachment = array('access_token' => $access_token); $result=$facebook->api('/me/feed', 'GET', $attachment); }catch(Exception $e){ echo " error: newsfeedcrontab.php, cannot get wall of ".$user.$e; } #do something with the result here # #but what does the result look like? #go to http://developers.facebook.com/docs/reference/api/user/ and click on the "feed" link under connections } } function getUsers(){ $sql = "SELECT distinct(uid) from facebook_user Where 1"; $result = mysql_query($sql); while($row = mysql_fetch_array($result)){ $rows [] = $row['uid']; } print_r($rows); return $rows; } mysql_close($link); ?> error Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/28/9687528/html/ss/src/cron.php:1) in /home/content/28/9687528/html/ss/src/facebook.php on line 49 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/content/28/9687528/html/ss/src/cron.php on line 110 Warning: Invalid argument supplied for foreach() in /home/content/28/9687528/html/ss/src/cron.php on line 64

    Read the article

  • jQuery toggle caching / cookies

    - by user1706680
    I’m using the jQuery toggle function for my navigation. By default the Authors toggle is visible, the Archives toggle is closed. http://jsfiddle.net/TeDFs/4/ My problem is that when the users switches to another page the toggles reset themselves. For example, when the user closes the Authors toggle and opens the Archive toggle and then navigates to another page the default settings are loaded. I read that it’s possible to store the settings via cookies but I’m absolutely new to jQuery and it would be great if somebody could help me out! HTML <div id="authors" class="widget"> <h2 class="widget-title-visible">Authors</h2> <div class="toggle"> <div class="submenu"> <ul> <li>Name 1</li> <li>Name 2</li> <li>Name 3</li> <li>Name 3</li> </ul> </div> </div> <div id="archives" class="widget"> <h2 class="widget-title">Archiv</h2> <div class="toggle hidden"> <div class="submenu"> <ul> <li>November 2012</li> <li>Oktober 2012</li> </ul> </div> </div> </div>? jQuery function toggleWidgets() { jQuery('.widget-title').addClass('plus'); jQuery('.widget-title-visible').addClass('minus'); jQuery('.widget-title').click(function() { $(this).toggleClass('plus').toggleClass('minus').next().toggle(180); }); jQuery('.widget-title-visible').click(function() { $(this).toggleClass('minus').toggleClass('plus').next().toggle(180); }); } jQuery(document).ready(function() { toggleWidgets(); } )? CSS .hidden{ display:none; } .plus { background: url(http://moargh.de/daten/sidebar_arrows.png) 0 5px no-repeat; padding: 0 0 0 12px; } .minus { background: url(http://moargh.de/daten/sidebar_arrows.png) 0 -10px no-repeat; padding: 0 0 0 12px; }

    Read the article

  • How to fetch and populate backbone model for Google Places JS API?

    - by code-gijoe
    I'm implementing a system that require access to Google Places JS API. I've been using rails for most of the project, but now I want to inject a bit of AJAX in one of my views. Basically it is a view that displays places near your location. For this, I'm using the JS API of Google places. A quick workflow would be: 1- The user inputs a text query and hits enter. 2- There is an AJAX call to request data from Google Places API. 3- The successful result is presented to the user. The problem is primarily in step 2. I want to use backbone for this but when I create a backbone model, it requests to the 'rootURL'. This wouldn't be a problem if the requests to Places was done from the server but it is not. A place call is done like this: service = new google.maps.places.PlacesService(map); service.nearbySearch(request, callback); Passing a callback function: function callback(results, status) { if (status == google.maps.places.PlacesServiceStatus.OK) { for (var i = 0; i < results.length; i++) { var place = results[i]; createMarker(results[i]); } } } Is it possible to override the 'fetch' method in backbone model and populate the model with the successful Places result? Is this a bad idea?

    Read the article

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