Does Android broadcast an intent when the network state has changend, i.e. from GSM to Wifi? And if so what permission do I need and what is the intent action called?
Hello there,
So my question is how to implement cancel/interrupt feature into all (I mean ALL) thread workers in your application in best and most elegant way?
It's not important if it's an HttpWebRequest, IO operation or calculation. User should have an possibility to cancel every action/thread at any moment.
I am trying to overwrite a JavaScript on change event in the below code with jQuery however I believe that the inline JavaScript is taking priority over the jQuery functionality declared. Essentially I am trying to have an AJAX version of my site which includes an additional JavaScript file. I need this functionality to still work without the additional AJAX version, but I am not sure as to whether I should include it in the main JavaScript file or leave it inline like it is right now. Any suggestions and information regarding them would be greatly appreciated! Thanks!
<form action="/cityhall/villages/" method="post" name="submit_village">
<select name="village" onchange="document.submit_village.submit();">
<option value=""></option>
</select>
</form>
I am trying to use the jQuery Form Plugin to submit the posts to the PHP to handle the requests as follows:
var bank_load_options = {
target: '#content',
beforeSubmit: showRequest,
success: showResponse
};
$('form.get_pages').livequery(function(){
$(this).ajaxForm(bank_load_options);
return false;
});
I modified the code as following:
<form action="/cityhall/villages/" method="post" id="submit_village" name="submit_village">
<select name="village" class="get_pages" rel="submit_village">
<option value=""></option>
</select>
</form>
<script>
# main JavaScript
$('.get_pages').live('change',function(e){
var submit_page = $(this).attr('rel');
$("#"+submit_page).submit();
});
# ajax JavaScript
var bank_load_options = {
target: '#content',
beforeSubmit: showRequest,
success: showResponse
};
$('.get_pages').live('change',function(){
var submit_page = $(this).attr('rel');
$("#"+submit_page).ajaxForm(get_pages_load_options);
return false;
});
</script>
However now it only runs every other option when I change it.
Hi,
We render SSRS reports through the Web Services API.
For some reason when I get the HTML back any toggle functionality is missing.
I see that ReportingExecutionService has an option called ToggleItem however I don't see any way of getting the item's ID.
How can I discover toggle items and enable an action to be called on one?
I need my app to be the default action for opening a particular file type. How do I control this? Also, how can my app access the file being opened?
Thanks.
I'm using explain to test these queries. The col type is DATE
this uses index:
explain SELECT events.* FROM events WHERE events.date = '2010-06-11'
this doesnt
explain SELECT events.* FROM events WHERE events.date >= '2010-06-11'
index as follows (phpmyadmin)
Action Keyname Type Unique Packed Field Cardinality Collation Null Comment
Edit Drop PRIMARY BTREE Yes No event_id 18 A
Edit Drop date BTREE No No date 0 A
i notice cardinality is 0, though there are some rows with the same date..
Hi!
There is an email service ExactTarget with web service API.
There are samples (in php though) for sending email to whole list instantly, or to single subscriber by triggered action.
It's pretty hard to get in it's documentation, and I couldn't find explanation how to send email to a single subscriber instantly without having some triggering actions.
Any help or advice will be great.
Thanks.
I know that I can assign an onclick action to <input type="button"-style buttons. But is it possible to let it behave like an <a> without using JavaScript? I ask because I'm in a situation where technically I'm better off using <a>'s, but buttons look nicer.
<form enctype="multipart/form-data" method="post" action="mailto:[email protected]" accept-charset="UTF-8">
Is there a problem if mails are sent this way .. i wanna avoid using PHP codes..
A php script is giving this array (which has been passed through json_encode())
[{name:"a1",path:"b1"},{name:"a2",path:"b2"}]
I use the following function to retrieve the array to jquery:
$.ajax({
type: "POST",
url: "functions.php",
data: "action=" + something,
cache: false,
success: function(response) { alert(response); }
});
The problem is I get the array back as a string:
(new String("[{name:"a1",path:"b1"},{name:"a2",path:"b2"}}]"))
How can I get it to be a javascript array?
Help would be much appreciated.
I have some cs files in my project that are not set to be built (Properties - Build Action = None). They contain bits of code that don't compile as a whole and are there merely for reference. I don't care about any compilation errors in them, but they appear in the "Error List" window, cluttering it. Is there some way to tell VS to ignore errors in that file? Or in all files not set to be built, at that ?
I'm using VS 2010
Thanks
I need to add one parameter to the default REST route for the show action for SEO purposes:
resources :neighborhoods, :only => [:index, :show]
neighborhood_url(neighborhood) # => /neighborhoods/lower-east-side
I want something like the following:
neighborhood_url(city, neighborhood) # => /neighborhoods/manhattan/lower-east-side
What would be the easiest way to do this without using nested routes and without breaking Rails REST conventions?
assuming i create a method which is passed an object, and that method would perform an action depending on the object passed. how should i identify the object?
i thought of using the class name to identify the object, but may be impractical since i could easily change the class name of objects, and generate headaches during future development. am i right?
I have this textbox I use to capture keyboard shortcuts for a preferences config. I use a low-level keyboard hook to capture keys and also prevent them from taking action, e.g. the Windows key, but the Alt key still comes through and makes my textbox lose focus.
How can I block the Alt key, so the focus is kept unaltered at my textbox?
Hello
I'm trying to be able to check if a selector have a certain sets of classes.
.hasClass() can only check if the selector has one class. And the .is() selector can look for multiple classes but will return true if the selector have at least one of the classes.
But I wan't to achieve a way to check if a selector have both of the classes, and only if it has both of the classes do action.
Any pointers?
Is it possible to create multiple widgets in runtime?
Application (Activity) should generate in some cases new widget(or edit exist) with new name and label and do some primitive action on click, which should be available in desktop widgets menu.
I am interested in activating another application's activity. I know from reading the Android SDK that it's probably better to do this with an implicit intent. However, this activity doesn't reside in an application I own, so I don't know the action and category and data flags on the intent-filter.
How can I examine an Android applications metadata like the activity classes and the intent-filters for those activities (if declared in the manifest)?
Thanks!
Hello,
Suppose we have 3 apps - appMain, app1 and app2.
Applications 1 and 2 are protected, they have is_secure: true and everything works fine with sfDoctrineGuard plugin.
A behavior I want to achieve is when a user is not authenticated, current application to forward him to another one, say appMain with defined module and action.
Is that possible? Or can someone tell me where to dig about security mechanisms in symfony?
I am using Zend Framework and it works fine in Firefox/Safari. In IE I have a problem with images not loading.
Say I have an image in my public folder and I have this in my page:
<img src="/photos/category/img.jpg" />
Well that works, except when I'm at a URL with a controller like
http://www.example.com/controller/action
I can see why, but I want a good solution to properly creating these img src links that works across browsers.
In continuation off of this question, what are the PHP statements I need to accomplish this:
curl -is -F 'J:A-login=BTDT::Action::Login' -F 'J:A:F-address-login=EMAILADDRESS' -F 'J:A:F-password-login=PASSWORD' http://hiveminder.com/splash | grep -o 'JIFTY_SID_HIVEMINDER=[0-9a-f]\+'
The flags and fields are still mysterious, and I've not the time presently to swim through docs to figure out how this translates. I do at least understand the | grep ... portion, though.
Hi, I need replace the same value for variables {place} and {other_place} in the record op.
#op{
action = [walk, from, {place}, to, {other_place}],
preconds = [[at, {place}, me], [on, floor, me],
[other_place, {place}, {other_place}]],
add_list = [[at, {other_place}, me]],
del_list = [[at, {place}, me]]
}
But erlang don´t share variables. Is there any data type for that?
I am parsing a log and inserting it into either MySQL or SQLite using SQLAlchemy and Python. Right now I open a connection to the DB, and as I loop over each line, I insert it after it is parsed (This is just one big table right now, not very experienced with SQL). I then close the connection when the loop is done. The summarized code is:
log_table = schema.Table('log_table', metadata,
schema.Column('id', types.Integer, primary_key=True),
schema.Column('time', types.DateTime),
schema.Column('ip', types.String(length=15))
....
engine = create_engine(...)
metadata.bind = engine
connection = engine.connect()
....
for line in file_to_parse:
m = line_regex.match(line)
if m:
fields = m.groupdict()
pythonified = pythoninfy_log(fields) #Turn them into ints, datatimes, etc
if use_sql:
ins = log_table.insert(values=pythonified)
connection.execute(ins)
parsed += 1
My two questions are:
Is there a way to speed up the inserts within this basic framework? Maybe have a Queue of inserts and some insertion threads, some sort of bulk inserts, etc?
When I used MySQL, for about ~1.2 million records the insert time was 15 minutes. With SQLite, the insert time was a little over an hour. Does that time difference between the db engines seem about right, or does it mean I am doing something very wrong?
why defined extension method with UrlHelper don't added in Url.EXTENSIONMETHOD when i want to use it in controller! but i have access to it in view?
public static string Home(this UrlHelper helper)
{
return helper.RouteUrl("ABC", new { controller = "ABC", Action = "Default" });
}
i haven't access:
public ActionResult Default()
{
return Redirect(Url.Home());
}
i have access in view:
<a href="<%=Url.Home() %>" title="Hello">Hello</a>
I have button-group component which contains a set of button-element components. The template is defined as:
{{#each buttons}}
{{button-element titleBinding="title" action="buttonAction"}}
{{/each}}
I'd like the buttonAction() method in the button-group component to have easy access to the set of button-element components and iterate through them. What's the easiest way to do this? I know I could use a jQuery/DOM approach like:
this.$('.btn').doSomething();
But I'd like to address the component objects not the DOM directly.