Hi,
I would like to create a calendar that displays a year from today(everyday) and allows the user to select the multiple dates.
I tried to use the asp:calendar without any success
I am developing in C# .NET
any suggestion
I have duplicate directory structures in two locations that I need to merge together in an svn repository. By "merge" I mean I want all files and folder that are unique to structure b to be moved into structure a. When I try to do this using svn move I get the error
svn: Path 'com' already exists
The folders look like this:
src
-> com
-> (many more files and directories)
-> java
-> com
-> (some files and folders, some folders overlap but all files are unique)
src\com is a and src\java\com is b.
I have two divisions in my html page with their respective css
<html>
<head>
#lowerone
{position:absolute; bottom:25px; right:25px; height:300px; width:300px;}
#upperone
{position:absolute; bottom:25px; right:25px; height:300px; width:300px; overflow:scroll;}
</head>
<body>
<div id="lowerone">
</div>
<div id="upperone">
<img src="/bg.3.jpg" />
</div>
</body>
</html>
But the upper div i.e. the UPPERONE is unscrollabe..
How to make it scrollable?
how can i copy part of the specific string to the another place
example
(aaa),(ddd),(fff),(fff),#p
copy (ddd) to the side of the p
(aaa),(fff),(fff),#p,(ddd) //before copyin add comma
copy (fff) to side of the (ddd)
(aaa),(fff),#p,(ddd),(fff) //string lenght always same
Instead of making a macro for each letter, as in
\def\bA{\mathbf{A}}
...
\def\bZ{\mathbf{Z}}
Is there a way to loop over a character class (like capital letters) and generate macros for each? I'd also like to do the same for Greek letters (using bm instead of mathbf).
Suppose I have a 2 column table (id, flag) and id is sequential.
I expect this table to contain a lot of records.
I want to periodically select the first row not flagged and update it. Some of the records on the way may have already been flagged, so I want to skip them.
Does it make more sense if I store the last id I flagged and use it in my select statement, like
select * from mytable where id > my_last_id order by id asc limit 1
or simply get the first unflagged row, like:
select * from mytable where flagged = 'F' order by id asc limit 1
Thank you!
I am trying to join two tables. I would like all the columns from the product_category table (there are a total of 6 now) and count the number of products, CatCount, that are in each category from the products_has_product_category table. My query result is 1 row with the first category and a total count of 68, when I am looking for 6 rows with each individual category's count.
<?php
$result = mysql_query("
SELECT a.*, COUNT(b.category_id) AS CatCount
FROM `product_category` a
LEFT JOIN `products_has_product_category` b
ON a.product_category_id = b.category_id
");
while($row = mysql_fetch_array($result)) {
echo '
<li class="ui-shadow" data-count-theme="d">
<a href="' . $row['product_category_ref_page'] . '.php" data-icon="arrow-r" data-iconpos="right">' . $row['product_category_name'] . '</a><span class="ui-li-count">' . $row['CatCount'] . '</span></li>';
}
?>
I have been working on this for a couple of hours and would really appreciate any help on what I am doing wrong.
Can someone help me fill in the blanks with native JavaScript?
function getHeading(lat1, lon1, lat2, lon2) {
// Do cool things with math here
return heading; // Should be a number between 0 and 360
}
I've been messing around with this for a long time and can't seem to get my code to work right.
I am having a hard time wording this when searching the internet so I am just going to ask the question.
I have an options view in my app that slides into view when the user clicks a button. This options view will display app information like settings. I want this options view to be displayed on every view controller in my app. I do not want to copy and paste the code for the options view into every viewcontroller file. The options view has quite a few outlets and actions and also calls many delegates.
How can I reuse this options view in all my view controllers without adding all the outlets, actions, and delegate methods each time?
I was going to make a new file with public methods, but I would still have to copy the outlets. Would this public methods file have to include delegate methods as well then?
Let me know if my question does not make sense. I am hoping there is a standard way of implementing something like this.
I have vendors/show view with button "Add new item" button. When i press "Add new item", it leads to items/new view with select which contain all Vendors.
I want to send vendor id value to items/new, that way it will be possible to show correct Vendor on my select.
How it can be done RIGHT?
I'm trying to run a mock webserver within a thread within a class. I've tried passing the class' @server property to the thread block but as soon as I try to do server.accept the thread stops. Is there some way to make this work? I want to basically be able to run a webserver off of this script while still taking user input via stdin.gets. Is this possible?
class Server
def initialize()
@server = TCPServer.new(8080)
end
def run()
@thread = Thread.new(@server) { |server|
while true
newsock = server.accept
puts "some stuff after accept!"
next if !newsock
# some other stuff
end
}
end
end
def processCommand()
# some user commands here
end
test = Server.new
while true do
processCommand(STDIN.gets)
end
In the above sample, the thread dies on server.accept
Suppose I have a table with following records
value text
company/about about Us
company company
company/contactus company contact
I have a very simple query in sql server as below. I am having problem with the 'or' condition. In below query, I am trying to find text for value 'company/about'. If it is not found, then only I want to run the other side of 'or'. The below query returns two records as below
value text
company/about about Us
company company
Query
select
*
from
tbl
where
value='company/about' or
value=substring('company/about',0,charindex('/','company/about'))
How can I modify the query so the result set looks like
value text
company/about about Us
I've seen so many misuses of RegExp, I don't really like it :)
I have string (as a result of two str_replaces) that might look something like this:
.?This iš my ".stRiNg."!
|
V
--this-is-my---string---
Is there any way better than
$string = trim(preg_replace('/[-]+/u','-', $string),'-');
to get:
this-is-my-string
?
Hi,
I can set the edit mode for a while uitableview by calling [tableView setEditing:YES]; But that sets the edit mode for all the rows in a table.
Is there a way to detect what row was swiped an enable the edit mode only for that row?
Thanks
I have 3 images, all same size, across top of page horizontally. I'd like to use Cycle to fade each instance very slowly, but I'd also like make sure the transitions do not start all at the same time, but are staggered. Is there somewhere this can be specified? If anyone can recommend a very slow fade rate, plus a way to prevent all 3 from fading/regenerating at the same time, I'd be very grateful!
I assume I can run 3 instances of cycle using different classes for each container, and assure that no two photos are the same by "stacking" them in different orders within the divs ... yes?
Thank you!
I've been having issues with this for a little while now. I feel like I should know this but I can't for the life of me remember.
How can I map the screen pixels to their respective 'graphical' x,y positions? The co-ordinate systems have been configured to start at the bottom left (0,0) and increase to the top-right.
I want to be able to zoom, so I know that I need to configure the zoom distance into the answer.
Screen
|\ Some Quad
| \--------|\Qx
| \ Z | \
| \ \|Qy
\ |
Sx\ |Sy
\|
I want to know which pixels on my screen will have the quad on it. Obviously as Z decreases, the quad will occupy more of the screen, and as Z increases it will occupy less, but how exactly are these calculated?
Thanks for any help.
I have a bunch of input text boxes that have the attribute ORIGINAL set to their initial value, so that when the user changes the textbox value, jQuery can highlight items that have changed (by comparing the text box's current value to the ORIGINAL attribute's value)
What Im trying to do now is provide the user with a button that they can click to revert all text boxes back to their original values based on the value of the ORIGINAL attribute of each text box.
Example
$('input[type=text]').val($(this).attr('original'));
The above doesnt work and I dont understand why.
I got a controller in my mvc application like below.
public class BaseController: Controller
{
protected void LogInfo()
{
logger.InfoFormat("[SessionID: {0}, RemoteIP: {1}]", Session.SessionID, Request.UserHostAddress); }
}
public class FirstController : BaseController
{
public ActionResult Index(string name)
{
LogInfo();
getQueryString();
if(IsValidRec())
{
if(Errors()))
{
return View("Error");
}
var viewname = getViewName(name);
return view(viewname);
}
else
return view("NotFound");
}
}
I need to create another controller(SecondController ) with same ActionResult method that FirstController has but without any implementation. Because I dont wont to repeat same code in 2 ActionResult methods.
what is the best way to do that. I tried in following way but I m getting error when I initialize my protected method 'LogInfo()'
public class SecondController : BaseController
{
public ActionResult Index(string name)
{
var firstcontroller = new FirstController();
return firstcontroller.Index(name);
}
}
Hi, i'm not an expert of Nant, so i'll have to ask this redicolus question.
i have a variable called svn.source.root which point to c:\folderA\FolderB\FolderC
how can i make svn.source.root.modified variable to point to 2 folders up? i.e, folderA
Obviously, the following didn't work:
please help.
thanks
ISNULL(SUM(MyTable.Total), 0) AS Total
how can i modify the above statement to also check if Total is less than 0 (zero), such that if Total is NULL or less than 0 (negative), i assign 0 to Total
Is there any way to fit in 1 line using the pipes the following:
output of
sha1sum $(xpi) | grep -Eow '^[^ ]+'
goes instead of 456
sed 's/@version@/456/' input.txt > output.txt
I have an organization that has clients and students, every student begins as a client.
If I have a Client class and a student class that inherits from client. How do I make a client a student?