w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Facebook sdk - share to managed pages
option to share to any managed pages the user has admin rights to Simply, give the PAGE_ID to the to parameter. Just like- FB.ui({ method: 'feed', name: 'This is the content of the "name" field.', link: ' http://example.com/', picture: 'http://myface.gif', caption: 'insightful thought provoking caption.', description: 'interresting".', message: '', to: MY_PAGE_ID }); i want to post in the future You can use the page access token if you want to post to your page at any later time, the page access token could be extended to never expiring. What are the Steps to getting a Long Lasting Token For Posting To a Facebook Fan Page from a Server To get the pages managed by you, query for- /me/accounts?fields=id,name , you'll get an array of pages you are

Categories : Javascript

Can I have two aspx pages share the same code-behind file?
Put your common logic into utility classes that all three visually different pages can call to exercise that functionality. For example, public static bool SaveValueToDatabase(string theValue) { // Call database from here } Now in your three pages, you can invoke this shared logic, like this: var success = SaveUserToDatabase(TextBox1.Text); if(!success) { // Alert user of failure }

Categories : Asp Net

Can ASPX pages share code behind file?
I am going to say that even if it is possible its going to make things VERY dirty. I would use inheritance ~/TemplateA/TemplateA.aspx ~/TemplateB/TemplateB.aspx ~/TemplateB/Contact.aspx where TemplateA.aspx and TemplateB.aspx inherits Contact.aspx

Categories : C#

Can I share information between multiple python apps via sqlite?
SQLite is quite suitable for sharing information between processes, although I suspect its locking is quite coarse-grained so if the processes make frequent updates (many a second) then you might find that this affects performance. However, if your processes are running on different machines then you'd need to arrange some shared storage for them. Since SQLite relies on file locking, shared filesystems like NFS may have issues - see their FAQ for details. MySQL and PostgreSQL are both sensible options which allow connections over a network and should make it easier for multiple machines to access the database at once, although they require considerably more setup than SQLite. All that said, it sounds like what you really want to achieve is for processes to be woken up by each other, and

Categories : Python

How to use session in jsp pages to get information?
Use <% String username = (String)request.getSession().getAttribute(...); %> Note that your use of <%! ... %> is translated to class-level, but request is only available in the service() method of the translated servlet. See how JSP code is translated to a servlet.

Categories : Java

Objects in core data share the same information and don't fully delete
If anyone comes upon this in the future I hope this helps answer their question. After several trials I found my problem. I was not populating my data correctly. All I had to do was return [collection.indexCard count]; in -tableView:tableView numberOfRowsInSection:section. I also had to make sure that whenever I added or deleted an object I use some form of [self.tableview reloadData]. P.S. If a change is made (and with any core data) delete the app from the simulator to reset everything.

Categories : IOS

Spring MVC: error pages and principal information
To access principal data from error pages, you need to map your spring security filter as: <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> <dispatcher>FORWARD</dispatcher> <dispatcher>REQUEST</dispatcher> <dispatcher>ERROR</dispatcher> </filter-mapping>

Categories : Spring

How to Route Multiple Pages to 'Edit' a Users Account Information (Rails)
Split the form up into separate .html.erb files (like email.html.erb and password.html.erb) and in your controller write something like: def edit ... if params[:email] render 'email' end if params[:password] render 'password' end end Obviously the conditions can be whatever you want.

Categories : Ruby On Rails

gradle: how to share a build.gradle which contains information I am the only one to have?
You could try to add all the needed properties to your gradle.properties file, which you add to version control, but leave the values empty. Eg: version=1.0 signing.keyId= signing.password= signing.secretKeyRingFile= sonatypeUsername= sonatypePassword= Then you override these in your own ${USER}/.gradle/gradle.properties. As an example take a look at a working project https://github.com/judoole/monitorino. Should be able to run all tasks at any machine except snapshot, stage and build. Edit: I would not do it like this today. Follow the Gradle guide, using required. Just as the example from @jb-nizet Gradle ref 53.3.3 Conditional Signing: http://www.gradle.org/docs/current/userguide/signing_plugin.html

Categories : Gradle

Ratchet Session storage
A controller can set the nickname to in the session: /** * @Route("/hello/{nickname}") */ public function indexAction($nickname) { $session = $this->getRequest()->getSession(); $session->set('nickname', $nickname); } To retrieve the nickname in your Chat app, public function onOpen(ConnectionInterface $conn) { $nickname = $conn->Session->get('nickname'); }

Categories : PHP

php ratchet websocket SSL connect?
The problem is that React (which Ratchet is built on) does not support direct SSL connections. See this issue. There is a simple workaround. Use stunnel with a config like: [websockets] accept = 8443 connect = 8888 Stunnel will handle SSL traffic on port 8443 and port them to your websocket server.

Categories : PHP

Programmatically load a url using Ratchet push.js
It's not elegant, but you could create a global function that exposes the push function. Open ratchet.js and add myGlobalPushFunction = function(){ PUSH(options) } around line 276 (above the PUSH function). Then call it like this: myGlobalPushFunction({ url: "index2.html", transition: "fade" })

Categories : Javascript

Ratchet / When.js: "Uncaught ReferenceError: module is not defined"
This may be solvable by using the following JavaScript before including the when.js file: window.define = function(factory) { try{ delete window.define; } catch(e){ window.define = void 0; } // IE window.when = factory(); }; window.define.amd = {}; Then, include your when.js file.

Categories : PHP

Ratchet Websocket can't receive data from client?
Your message does not conform to the WAMP standard. Take a look at AutobahnJS for your client connection. Also take a look at the Ratchet Push Integration Tutorial, which has a functional example.

Categories : PHP

Ratchet PHP zeromq fallback to older browsers
Ratchet supports web-socket-js, which is a natural polyfill. The ZMQ code is on the server side and will still be executed if your client is using native WebSockets or the Flash polyfill. Keep your code from the Push tutorial as is, add web-socket-js code to your client and then see the code from the FlashPolicy component. For a bit more involved example, see this example on how to server Flash Policy files without having to run two separate processes.

Categories : PHP

Ratchet send doesn't work with sleep function
It is not a good idea to use sleep() with ratchet. Instead it would be best to take advantage of its existing event loop. I'm not sure what exactly you are trying to accomplish, but here is a basic example. I am willing to bet that you will need to re-work your code to accommodate this different technique. //Start the server $server = IoServer::factory( new WsServer($session), $port, $addr ); //Attach the loop $server->loop->addPeriodicTimer(2, function () { $client->send($res->asXML().""); }); Sources: https://github.com/reactphp/event-loop https://groups.google.com/forum/#!msg/ratchet-php/MsTqELDoBb0/lQ_J8aR2eUcJ

Categories : PHP

How to attach a Symfony Session with the connection object from Ratchet?
As the documentation states need to setup a non-native session handler to store your sessions i.e. in a database via PDO. Then you need to configure Ratchet to use your session handler. If you're using ClankBundle you can read this documentation chapter.

Categories : Symfony2

Ratchet framework: needing to click logout link twice
I believe I solved the issue. From that link I had posted before, I had inserted the following code into all of my main PHP pages: $cookieLifetime = 365 * 24 * 60 * 60; // A year in seconds setcookie(session_name(),session_id(),time()+$cookieLifetime); I don't fully understand this, but I get that it's basically creating a cookie which allows the session to be maintained even when the app is run in iOS's sandboxed full-screen web app mode. I was able to fix the issue by removing this code from my login.php script while keeping it on every other page of my app. logout.php remains as before. Now, my saved-to-home-screen full screen web app will keep the user logged in, even if the iPhone is restarted. They are also able to logout with a single tap of the logout button instead of twice.

Categories : PHP

Google Plus share on ios directs to web page with broken links in share and cancel button
Something must be wrong with your google plus api setup. Google Plus is trying to reopen your app using a URL scheme that looks something like youdefinethis://somethingtodoinyourapp If you have setup google plus to use a specific url scheme to reopen your app, you need to define this same scheme in your project settings under Info -> URL Types. This is a hard problem to solve because of the lack of information you can give us without risking your privacy. Did you complete all the instructions that are listed here?: https://developers.google.com/+/mobile/ios/getting-started

Categories : IOS

How can I share share read/write access to a file within the same process, but forbid it externally?
Files are generally not for multi-user interactions such as this. A database is what is needed here. Then the data you need written can be saved to the database and all the synchronous handling would now be the databases responsibility. If you still require a file, after the data has been input, it would be an idea to generate the file when needed based off the database data.

Categories : C

Google plus share button callback (when share is succeded)
https://developers.google.com/+/web/share/ onendinteraction function(jsonParam) If specified, this function is called when the interaction bubble disappears. You can use this callback function to modify your page, such as resuming a video, when the bubble closes. This function accepts a single parameter, which is identical in structure to the parameter passed to onstartinteraction.

Categories : Javascript

Facebook Doesn't appear on share windows when trying to share an Image
after correcting my childish mistake (see EDIT part in question) and Using this code snippet I finally solved this problem. if anybody knows whats the difference between using contentValue and my approach please share that with me.

Categories : Android

Is there any way to share on google plus stream, without entering to share dialog ..?
Too low of a reputation to comment, but check out this answer Where it states UPDATE 3: Google just announced Google+ History. You can use it to write "moments" (which are private by default) but can then be made public by sharing them directly to your stream and/or your profile. One of the moment types is CommentActivity.

Categories : Iphone

Always Display Child Pages on Parent Pages and Child Pages PHP MySQL
perhaps I can try to understand your question using an example. Consider, your table has the following records: id title parent 1 a 0 2 b 0 3 c 0 4 a1 1 5 a2 1 6 b1 2 7 c1 3 8 c2 3 9 c3 3 Your above code will generate an output like this in the first run, i.e. a list of all parent categories and their child categories: a a1 a2 b b1 c c1 c2 c3 Your requirement is that if someone clicks on a parent category, say "a", it should show only a's child categories and hide all child categories of "b" and "c". Right? Additionally, if someone clicks on the child category, it should still show the same result as if someone clicked on the parent page. If my understanding on your requirement is correct, you can fix your code by passing the paren

Categories : PHP

Ratchet's push.js form submit reloads page, messes up push.js replacing div
What if you try the following (finish with return false): <script type="text/javascript"> $("#search").submit(function(event) { event.preventDefault(); // does not do anything (push.js... reloads page) // your logic here return false; }); </script>

Categories : Javascript

How to/Can we hide share target apps(e.g OneNote, Twitter, etc.) that are displayed after tapping share from charms bar using c# in win 8/winrt apps?
Yes, it is possible to do what you want to. Here is the link for the same. The procedure is The Share charm automatically lists all of the apps installed on your PC that can share. But if you don't want certain apps to appear, you can remove them from the list without uninstalling them.To remove an app from the app list :- Swipe in from the right edge of the screen, tap Settings, and then tap Change PC settings. (If you're using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, click Settings, and then click Change PC settings.) Then tap or click Share. Under Use these apps to share, find the app you don't want to appear, then set the slider to Off to remove it.

Categories : C#

what does it mean "(include_path='.:/usr/share/pear:/usr/share/php')"?
Thats just the directories showing you where PHP was looking for your file. Make sure that cron1.php exists where you think it does. And make sure you know where dirname(__FILE__) and $_SERVER['DOCUMENT_ROOT'] are pointing where you'd expect. This value can be adjusted in your php.ini file.

Categories : PHP

Share links with my app using "Share via" in Android
I have set an Intent Filter on an activity so that my app displays in the "Share via" dialog. That part works fine, but I'm not sure how to actually get the data into my "new post" dialog when it launches. If by "the data", you mean the text that was shared, call getIntent() on your activity and read the EXTRA_TEXT extra for that. In the case of browsers sharing URLs, EXTRA_TEXT should be the URL.

Categories : Android

AngularJS application hosted on Github pages (gh-pages) ajax crawling
BromBone (http://www.brombone.com/) claims to offer that _escaped_fragment_ handling as a service for you. However, it's a commercial service. I guess it would matter how important it was to you for those pages to work with Google.

Categories : Ajax

Wordpress: Query child pages content while on parent pages
I figured it out. Hopefully anyone else having this question will find this! I found the wordpress codex for get_pages: http://codex.wordpress.org/Function_Reference/get_pages <?php $children = get_pages( array( 'sort_column' => 'menu_order', 'sort_order' => 'ASC', 'hierarchical' => 0, 'parent' => $post->ID, 'post_type' => 'projects', )); foreach( $children as $post ) { setup_postdata( $post ); ?> <div class="section-container"> <?php the_content(); ?> </div> <?php } ?>

Categories : Wordpress

Is it possible to create wordpress category pages like home pages? (designed)
Firstly your question is not clear and you just asked a general question for that answer is Yes absolutely Possible. Without any specific information of theme or error, we cant help you. Here is some thought: You can easily customize wordpress theme category page category.php or even if you want a different category template for only one category, you can do that. To do that, create category-[slug].php or category-[id].php file in your theme files - replace slug or id whatever you use with that of category you want a different tempelate. Once you edit template for category page, you can add all options yourself - Good option is to display a Slider of category page and query posts for that category only to show on that slider or show promotional stuff on top from that category in slide

Categories : Wordpress

Apache redirect all sub pages to home page except specific pages
In the VirtualHost section of www.domain.co.uk insert this code just below RewriteEngine On line: RewriteCond %{REQUEST_URI} !^/(terms|request-information)(/.*|)$ [NC] RewriteRule ^ / [L,R=301] EDIT: Multiple rewrite rules seem to cause a redirection error, only use one.

Categories : Apache

VBA to Copy Information From a Folder of Files and Compile Information to a Single Workbook
This is not the full code, but it should help you. When you work with multiple workbooks keep track of them. For example start with: Dim CurrWB As Workbook Set CurrWB = ActiveWorkbook Then in the cycle: Dim WB As Workbook For Each StrFile In var Set WB = Workbooks.Open(loc & StrFile) ... WB.Close Next StrFile Inside the cycle you can find the area to copy doing something like: R1 = 1 Do While WB.Sheets("Sheet name").Cells(R, 2) <> "Starting text" R1 = R1 + 1 Loop R2 = R1 + 1 Do While WB.Sheets("Sheet name").Cells(R2, 2) <> "Ending text" R = R + 1 Loop For R = R1 to R2 CurrWB.Sheets("Report").Cells(RReport, 3) = WB.Sheets("Report").Cells(R, 3) RReport = RReport + 1 Next R

Categories : Excel

Reply mail structure information: how to retrieve sent and received information
There's no standard for the structure of a reply email. It's not usually done using multipart email, it just uses human-readable text, often with > prefixes to denote quoted text. This allows replies to be interspersed inline with the quoted material. The only standard features of replies are a couple of headers: In-Reply-To: <ID> and References: <ID1>, <ID2>, <ID3>, ... In-Reply-To contains the message ID of the message that was replied to. References is a growing list of message IDs -- when you reply, you take the original message's reference list and append the ID of the message being replied to at the end. See RFC 5322 for more details about these headers.

Categories : PHP

Iterate through pages in Word and find pages contains image
A Document has a Shapes Collection representing all the Shapes. Each Shape has an Anchor, using which we can get to the TopMargin, and other properties, of the shape's page: Sub JiggleAllShapes() Dim shp As Shape For Each shp In ActiveDocument.Shapes shp.Anchor.Paragraphs(1).Range.PageSetup.TopMargin = 0 Next shp End Sub We can get the page number from the Anchor: shp.Anchor.Information(wdActiveEndPageNumber) There is a Pages Collection but it is not as useful IMO: Sub WhatAboutPages() Dim pge As Page For Each pge In ActiveDocument.ActiveWindow.Panes(1).Pages 'Debug.Print pge.NothingUsefulHere Next pge End Sub With this approach you would have to delve into the Rectangles collection and use RectangleType to try to determine if the current

Categories : Vba

VisualForce Pages automatically including "loose.dtd" in all pages
This is documented in salesforces documentation. The default doctype is loose, if you want a stricter or different doctype you need to specify it using the docType attribute. Eg <apex:page controller="Pagecontroller" docType="html-5.0"> More info here: http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_page.htm

Categories : HTML

How do I create redirects in Umbraco when old pages have same directory as new pages?
this will tell you how MVC is interpreting the route http://haacked.com/archive/2008/03/13/url-routing-debugger.aspx

Categories : Asp Net Mvc

define Java class in jsp pages and reuse them across different jsp pages
Using a filter would promote re-use. If you wanted to include test1.jsp within test2.jsp you can use scriplets to include (or forward request) to test2.jsp. But underneath jsp will be compile to a servlet (class).

Categories : Jsp

How to Create ASPX web pages dynamic when the site is run(Like Tag Pages)?
Suppose: Table - Article : I am considering only few columns with their datatypes that relates to an article. Id (PK, Autogenerated), Title(varchar(1000)), Description(ntext), ArticleDate(datetime2), Tags(varchar(1000)) Allow user to select multiple tags as SO does or a text box where tags will be entered as comma separated value. Suppose after entering a record we have Id | Title | Description | ArticleDate | Tags --------------------------------------------------------------------------------- 1 | How to use tags in article? | blah!blah!blah! | 09/07/2013 | c#,asp.net, English,.net, sql say front end has link having tag SQL.

Categories : C#

Hide the share action icon near the share action provider WITHOUT ActionBarSherlock
but none of them clearly say how to edit the Android sources to have another "version" of the ActionBar that hides the icon. That is because you do not change the action bar. You change the ShareActionProvider. If you do not like the existing implementation of ShareActionProvider, create your own, perhaps using the existing implementation as a starting point. For example, that is what the accepted answer on the Android: ShareActionProvider with no history question describes. Neither the question nor the answer reference ActionBarSherlock.

Categories : Android

© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.