Is there anyway to detect when a user logins if there is already another session with the same username, and block him from logging in again or send him a message?
Actually I have a domain - domainone.com
I have created a subdomain cname of anoter domain as
abc.domaintwo.com - CNAME as - domainone.com
so that I can use the js and css files e.g domainone.com/js/jquery.js files as abc.domaintwo.com/js/jquery.js
SO Far everything is FINE, no issues at all.
Problem:
I have a custom 404 page for domainone.com and now when that abc.domaintwo.com goes 404 same page appears which i don't want. Any help is appreciated.
Htaccess of domainone.com:
ErrorDocument 404 /404/
All i want is to have different 404 for both.....
Notes: Don't have access to shell for symlinks or alias as I am on shared hosting.
I'm puzzling my head as to how some application appear to support the couple of Rotational Sensor APIs for Symbian, specifically the Sensor API and the Sensor Framework (both the 5th ed. and the 3rd ed. FP2 backport).
For example, I believe that Gravity will support rotation in N95 and also newer models from the same binary (could be wrong there...).
If I use the Sensor Framework then my app will not install on an N95 (it gives me a System Error -1), whereas if I use the Sensor API (RRSensor) then it will only install on an N95 and no other phones. This is most likely due to the available libraries on those devices.
I am trying to find some way of abstracting things such that I can use exactly the same binary for all devices. The only alternative I can see is trying to use ECOM plugins and then installing the relevant library using conditionals in my PKG file.
Does anyone know of a better/easier way?
Hi!
I want to create a little app that takes two images and i want to make only the image over draggable.
After research, i found this solution :
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[ event allTouches] anyObject];
image.alpha = 0.7;
if([touch view] == image){
CGPoint location = [touch locationInView:self.view];
image.center = location;
}
It works but the problem is that the image is draggable from its center and i don't want that.
So i found another solution :
- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {
// Retrieve the touch point
CGPoint pt = [[touches anyObject] locationInView:self.view];
startLocation = pt;
[[self view] bringSubviewToFront:self.view];
}
- (void) touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event {
// Move relative to the original touch point
CGPoint pt = [[touches anyObject] locationInView:self.view];
frame = [self.view frame];
frame.origin.x += pt.x - startLocation.x;
frame.origin.y += pt.y - startLocation.y;
[self.view setFrame:frame];
}
It works very well but when i add another image, all the images of the view are draggable at the same time.I'm a beginner with the iphone programmation and i have no idea of how i can only make the image over draggable.
Thank you in advance for your help!!
http://jinimatics.com/test.php (this works)
http://jinimetrix.com/test.php (this does not)
(Curl is installed on both servers along with fairy recent Lamp Stack)
I have an unordered list which contains serveral items called 'oListItems' the UL has a class but no id.
The class OuteroListItems contains many of oListitems
oList.AppendFormat("<ul class='OuteroListItems'>");
oList.AppendFormat("<li>");
oList.AppendFormat("<ul class='oListItems'>");
oList.AppendFormat("<li>" + s.sName + "</li>");
oList.AppendFormat("<li>" + s.eName + "</li>");
oList.AppendFormat("<li>" + s.SDate + "</li>");
oList.AppendFormat("<li>" + s.EDate + "</li>");
oList.AppendFormat("</ul>");
oList.AppendFormat("</li>");
oList.AppendFormat("</ul>");
I want for each .oListItem class that gets retrieved, add dynamically an id to it.
var o = $(".oListItem");
$.each(o, function (){
var f = $(this).attr("id", 'listItem' + i);
i++;
});
wasent sure on the approach, this is what I have so far?
I have two servers, server1 and server2 on same network but require username and password to be mapped. server1 has a text file as C:\Users\output.txt.
I want to create and schedule a batch script on server1, which should copy and replace output.txt file from server1 to server2 at path E:\data\output.txt on daily basis.
I don't want to map server2 manually every time I start my computer nor do I want to enter my username and password each time.
I am using following commands in a batch, but not working;
net use C: \\server2\E:\data server2password /user:server2domain\server2username /savecred /p:yes
xcopy C:\Users\output.txt E:\data\
I have this code (which doesn't work):
Public Class Form1
End Class
Public Module test1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Form1.Button1.Click
MsgBox("HI")
End Sub
End Module
I know I could handle the button click event in Form1, and then call a function in test1, but I would like to handle the button click event directly in the test1 module. Is there a way to automatically send UI events from the Form1 class to another module?
Hello,
I use Visual studio 2008
I have 5 listbox's on form,I created a new class file -called him "scaner.cs"
scaner.cs -he cannot see "listbox".
I have create an instance.
scaner Comp = new scaner(listBox2, listBox1, listBox3, listBox4, listBox5);
In scaner.cs file I use it like this.
class scaner
{
public ListBox ls;
public ListBox lsE;
public ListBox lsIVars;
public ListBox lsNumbers;
public ListBox lsStrings;
public scaner(ListBox ls, ListBox lsE, ListBox lsIVars, ListBox lsNumbers, ListBox lsStrings)
{
this.ls = ls;
this.lsE = lsE;
this.lsIVars = lsIVars;
this.lsNumbers = lsNumbers;
this.lsStrings = lsStrings;
}
}
My question : How can i replaced this big code to more "comfortably" method.
scaner Comp = new scaner(listBox2, listBox1, listBox3, listBox4, listBox5);
IF i had more then 5 listbox's ,it will be awful.
How can i acced form another class file "Listbox's"
Thanks for answers.
I'm playing with rewriting part of a web application in Rails + Ext. However, I'm having trouble getting an associated models' name to display in the grid view.
I've been able to successfully convert several models and arrange the views nicely using tabs and Ext's layout helpers.
However, I'm in the middle of setting up an association -- I've followed along with Jon Barket's tutorial on how to do this using Ext -- and I've made all the Rails and JS changes suggested (with appropriate name changes for my models,) the result being that the combo box is now being correctly populated with the names of the associated models, and changes are actually written correctly to database, BUT the data doesn't show up in the column, it's just empty. However, the correct data is there in the 'detail' view.
Really just wondering if anyone else ran into this, or had any thoughts on what could be happening. Definitely willing to post code if requested; just note that (AFAIK) my changes follow the tutorial pretty closely.
Thanks in advance!
UPDATE:
Alright, slight progress - kind of. I can get the associated model id # displaying properly -- just by modifying the column model slightly. But I can't get the virtual attribute displayed in the main table (in Jon's example it's country_name.) It still goes blank when I change the data source for that column from
dataIndex: 'model[associated_model_id]'
to
dataIndex: 'virtual_attributes[associated_model_name]'
ANOTHER UPDATE:
Bump. Has NOBODY here tried integrating Ext with Rails?
Here is my problem:
I have 2 tables Accounts and Transaction Logs.
in Accounts table, it has column "Amount" which is a base amount of an account.
and in Trans Logs table, it also has column "Amount" which is additional (add or minus to the base amount) amount of the account.
and I don't know how to retrieve that base amount to edit it, then save it back to the table.
That means I need to get a value of the right column by using Acc_No to find. I'm using DataSet, by the way.
i think it should go like this:
Dim Amount as Decimal
Amount = *the code to retrieve the base amount*
Amount = Amount + txtAmount.Text
*the code to save the new amount back to Accounts table*
Thank you!
My current query returns a table like:
+------------+
value1 | ....
value1 | ....
value2 | ....
value3 | ....
+------------+
I want:
+------------+
value1 | ....
value1 | ....
+------------+
I want to only receive all rows with the first value. Normally I would do a WHERE clause if I knew that value, and I cannot use a LIMIT because each value has a different number of rows.
Right now My query looks like "SELECT u.*, n.something, w.* FROM ... AS u, ... AS n, ... AS w WHERE u.id = n.id AND w.val = n.val AND u.desc LIKE '%GET REQUEST VARIABLE%';"
This works great, except I get way too many rows and using PHP to do this ruins code portability and is superfluous.
Thanks for reading
I used this code to connect to a database and fetch results. This worked perfectly until i tried to work in another query to the images table to get associated images. I'm not very experienced with OO programming. So hopefully someone can see where ive gone wrong and help me out.
<?php
global $__CMS_CONN__;
$sql = "SELECT * FROM ecom_products";
$stmt = $__CMS_CONN__->prepare($sql);
$stmt->execute(array($id));
while ($row = $stmt->fetchObject()) {
$imagesql = "SELECT * FROM ecom_product_images where id = $row->id && where primaryImage = '1'";
$imagestmt = $__CMS_CONN__->prepare($sql);
$imagestmt->execute(array($id));
$imageName = $imagestmt->fetchObject();
echo '<a href="'.URL_PUBLIC.$row->id.'">'.$row->productNm.'</a>'.$imageName;
}
?>
I recently registered a oneindia domain and they provided a email account at my domain name
i.e http://webmail.mydomain.com
is tat email account is reliable??can i use tat mail for important projects??
I have a window which contains a Frame which references a 'home' page that has buttons on it. When a button is clicked I want another page to show depending on which button was pressed. I attempted to use
NavigationService.Navigate('mynextpage.xaml')
and that works however, I want to use a customized navigation panel. I call
this.ShowsNavigationUI = false;
on my 'home' page but the bar still shows. Is there a way to accomplish what I am trying to do?
My page with the frame is a window so I do not know how to disable the Navigation bar there where I guess it is coming from.
Further testing shows that the ShowsNavigationUI property is false yet the nav bar shows itself in the parent window once there is a second page to go to (showing the 'home' page in the history.
TIA
example some array {2,8,9,10,21,32,1,6,3...}
first child take (data size / 2) and sort
second chile take (data size / 2) and sort after combine 2 child data and give us a sorted full data, is it possible with some algorithms?
I have an SQLAlchemy ORM class, linked to MySQL, which works great at saving the data I need down to the underlying table. However, I would like to also save the identical data to a second archive table.
Here's some psudocode to try and explain what I mean
my_data = Data() #An ORM Class
my_data.name = "foo"
#This saves just to the 'data' table
session.add(my_data)
#This will save it to the identical 'backup_data' table
my_data_archive = my_data
my_data_archive.__tablename__ = 'backup_data'
session.add(my_data_archive)
#And commits them both
session.commit()
Just a heads up, I am not interested in mapping a class to a JOIN, as in: http://www.sqlalchemy.org/docs/05/mappers.html#mapping-a-class-against-multiple-tables
Hi,
I need to compare two files and redirect the different lines to third file. I know using diff command i can get the difference . But, is there any way of doing it in python ?
I hv a table like this:-
Item Model Remarks
-----------------------------------------
A 10022009
B 10032006
C 05081997
I need to copy the info from "Model" to "Remarks" with the following format:-
Item Model Remarks
-----------------------------------------
A 10022009 20090210
B 10032006 20060310
C 05081997 19970805
Thanks
Hi,
I have a model I named User, and I want use two different Views to edit it: the usual edit view and another view I called edit_profile.
I had no problem in creating routing, controller and views: I added edit_profile and update_profile views, and I added on routes.rb the line:
map.resources :users ,:member => {:edit_profile => :get, :update_profile => :put}
The problem is: when I submit the form in edit_profile and some error occur in some input fields, rails reload the edit_path page instead of edit_profile_path page !
This is the form on edit_profile.html.erb
form_for(:user, @user, :url => {:action => :update_profile}, :html => { :method => :put} ) do |f|
= f.text_field :description
= f.text_area :description
= f.error_message_on :description
....
....
= f.submit 'Update profile'
After clicking Update profile, if input errors occur I want to show edit_profile view instead of edit view
Do You have some ideas ?
many thanks
i am using two table postjob and job location
want to distinct jobtitle
The query is:
select postjob.jobtitle,
postjob.industry,
postjob.companyname,
postjob.jobdescription,
postjob.postid,
postjob.PostingDate,
Job_Location.Location,
Job_Location.PostigID
from postjob
inner join Job_Location
on postjob.postid = Job_Location.PostigID
Where postjob.industry=' Marketing, Advertising'
output of this query
http://www.justlocaldial.com/Industry_search.aspx?ind=Marketing,%20Advertising
This line:
used_emails = [row.email for row
in db.execute(select([halo4.c.email], halo4.c.email!=''))]
Returns:
['[email protected]', '[email protected]', '[email protected]', '[email protected]', '[email protected]']
I use this to find a match:
if recipient in used_emails:
If it finds a match I need to pull another field (halo4.c.code) from the database in the same row. Any suggestions on how to do this?