I want to perform a printf() to display when the currently executing code was last compiled. Does C/C++ provide a macro that gives you that resolves to a timestamp during compilation?
I am wondering if there are any good reasons to ever store time information in anything other that UTC (GMT)? I believe that this is a solid rule for all software engineering. The conversion to local time is merely a translation that happens at the UI layer for display purposes. I have also seen cases where the translatation is needed in order to implement an algorithm correctly (for handling midnight date changes, etc.).
I am having an issue with a slider (implemented using Prototype) and IE7. Upon the slider value change I update a with the value such as "420,000".
Now on all browsers other than IE7 this is display correctly. But on IE7 it is displayed as "420.000" ..
my question is how did the "," become "."
the page has UTF-8 meta tag.
Any help?
hi everyone, i have a collection of book object in a hashmap, the book has book_title, book_author, book_year_published, etc. i want to sort them based on the book_title which is a String, in both ascending and descending order, and display them on the screen. i wish someone can help me, i have been doing this for hours and still havent come up with a solution. thanks in advance
Is there a CSS library which mimics the iPhone grouped UITableView?
I want to build a nice looking table which looks exactly like the grouped UITableView. As there are multiple text styles within the each line of text, and I don't need any interactivity except scrolling, it seems it would be easier to build with HTML and display it in a UIWebView. Is there a css library which matches this need?
I'd like to know if is there a way to "skin" a Form and every widget used inside it. Images should be on background and other elements shall be setup accordingly.
In short, a way to implement a way to display the same Form in different flavors (i.e.: theme and eyecandy UI).
I've gotten myself stuck on how to handle inheritance in my model when it comes to my controllers/views.
Basic Model:
public class Procedure : Entity
{
public Procedure() { }
public int Id { get; set; }
public DateTime ProcedureDate { get; set; }
public ProcedureType Type { get; set; }
}
public ProcedureA : Procedure
{
public double VariableA { get; set; }
public int VariableB { get; set; }
public int Total { get; set; }
}
public ProcedureB : Procedure
{
public int Score { get; set; }
}
etc... many of different procedures eventually.
So, I do things like list all the procedures:
public class ProcedureController : Controller
{
public virtual ActionResult List()
{
IEnumerable<Procedure> procedures = _repository.GetAll();
return View(procedures);
}
}
but now I'm kinda stuck. Basically, from the list page, I need to link to pages where the specific subclass details can be viewed/edited and I'm not sure what the best strategy is.
I thought I could add an action on the ProcedureController that would conjure up the right subclass by dynamically figuring out what repository to use and loading the subclass to pass to the view. I had to store the class in the ProcedureType object. I had to create/implement a non-generic IRepository since I can't dynamically cast to a generic one.
public virtual ActionResult Details(int procedureID)
{
Procedure procedure = _repository.GetById(procedureID, false);
string className = procedure.Type.Class;
Type type = Type.GetType(className, true);
Type repositoryType = typeof (IRepository<>).MakeGenericType(type);
var repository = (IRepository)DependencyRegistrar.Resolve(repositoryType);
Entity procedure = repository.GetById(procedureID, false);
return View(procedure);
}
I haven't even started sorting out how the view is going to determine which partial to load to display the subclass details.
I'm wondering if this is a good approach? This makes determining the URL easy. It makes reusing the Procedure display code easy.
Another approach is specific controllers for each subclass. It simplifies the controller code, but also means many simple controllers for the many procedure subclasses. Can work out the shared Procedure details with a partial view. How to get to construct the URL to get to the controller/action in the first place?
Time to not think about it. Hopefully someone can show me the light. Thanks in advance.
I have an UIImageView with an image. Now I have a completely new image (graphic file), and want to display that in this UIImageView. If I just set
myImageView.image = newImage;
the new image is visible immediately. Not animatable.
I want it to nicely fade into the new image. I thought maybe there's a better solution than just creating a new UIImageView on top of that and blending with animation?
i have passportno(varchar) in database.
i am entering values like this 001,002,003. and i want to display like sorting order.
now i wrote query like this "select * from passport_registration where status=1 ORDER BY passportno" then displaying output like this......077,088,099,100,1000,1001,1009,101,1010
i want to diplay sort order. how to do?
hello all i am new bie in iphone development in my project there is one requirement that while editing text there are iphones inbuilt buttons copy paste and select all i want the clickevent on all this buttons and also want to display action sheet title on their respective click events please guide me how can i do that
thanks in advance
HI ,
How do i change the Kentico CMS search settings so as to display a part of text from search results as in Google .presently it shows only the path in the results.
hey all i have a program for inserting new now dynamically in table view. But it displays the inserted row the end.How can i display the inserted row at the first position.
Since attributes don't inherit in C# (at least I didn't think they did) - how does the following code still display the Hello popup when the MyTestMethod test is run:
[TestClass]
public class BaseTestClass {
[TestInitialize]
public void Foo() {
System.Windows.Forms.MessageBox.Show("Hello");
}
}
[TestClass]
public class TestClass : BaseTestClass {
[TestMethod]
public void MyTestMethod() {
Assert.IsTrue(true);
}
}
I am new to iphone development.I am parsing a xml and display the title,date,contents and image in the cell,Now the scrolling is not smooth, it struck.How can i increase it.I have already applied lazy loading in another view, i am not able to apply in the new view.So how can i increase the scrolling performance.Can i check for any condition that if image is already loaded in the image view,if so i can stop once again the loading of image view. Please help me out.Thanks.
Hello Everyone,
I have anchor tag
<a id="click" href="javascript:void(0);" onclick="disable();" style="">Clickme</a>.
When html loads it showing clickme,when i click anchor link,it calls disable() function,In disable function i am trying to hide it using below code:
document.getElementById("click").style.display='none';
But page never hides that anchor link,Please let me know if i am doing anything wrong.
Thanks in advance.
This is the CSS I'm currently using to produce a horizontal menu. Does anyone have any suggestions on how to go about extending it to allow for submenus?
/* CSS Document */
.rhm1{
width:780px;
height:64px;
margin:0 auto;
background:url(images/rhm1_bg.gif) repeat-x;
}
.rhm1-left{
background:url(images/rhm1_l.gif) no-repeat;
width:15px;
height:64px;
float:left;
}
.rhm1-right{
background:url(images/rhm1_r.gif) no-repeat;
width:15px;
height:64px;
float:right;
}
.rhm1-bg{
background:url(images/rhm1_bg.gif) repeat-x;
height:64px;
}
.rhm1-bg ul{
list-style:none;
margin:0 auto;
}
.rhm1-bg li{
float:left;
list-style:none;
}
.rhm1-bg li a{
float:left;
display:block;
color:#ffe8cc;
text-decoration:none;
font:12px 'Lucida Sans', sans-serif;
font-weight:bold;
padding:0 0 0 18px;
height:64px;
line-height:40px;
text-align:center;
cursor:pointer;
}
.rhm1-bg li a span{
float:left;
display:block;
padding:0 32px 0 18px;
}
.rhm1-bg li.current a{
color:#fff;
background:url(images/rhm1_hover_l.gif) no-repeat left 5px;
}
.rhm1-bg li.current a span{
color:#fff;
background:url(images/rhm1_hover_r.gif) no-repeat right 5px;
}
.rhm1-bg li a:hover{
color:#fff;
background:url(images/rhm1_hover_l.gif) no-repeat left 5px;
}
.rhm1-bg li a:hover span{
color:#fff;
background:url(images/rhm1_hover_r.gif) no-repeat right 5px;
}
With jQuery, how can I display a flash message at the top of the page in an easy way? Is there something built-in, or a plugin, or is it easy enough to do it yourself?
What I mean is like after a successful ajax post I would like to just say "hey, it went good" in a non-obtrusive way.
Hello,
I am looking to load Webview with URL and get content(images) of that.Then scale it to display properly in small size of WebView ot Imageview.
How to do that ?
Thanks,
I have 5 worksheets and a textbox on each worksheet. I would like all the textboxes to display the same value, which would be whatever the user enters in the first textbox. So once a value is entered in textbox1 on sheet1, textbox2 on sheet2, etc. will be populated with the same value.
I'm looking for something like changing linkedcell =WorksheetName!textbox1 although I'm pretty sure that is incorrect.
I want to send the below data to default.ctp, I want to display menus in all the pages, I'm using Auth, The problem is if I'm logged in I get the Menus correctly, but if I logout, I'm getting error saying variable'$topMenu' not found.
The MenuController can be accessed only if logged in.
$this->loadModel('Menu');
$this->set('topMenu',$this->Menu->find('all'));
Any help on how to solve this?
I'm trying to display an html source ( without interpretation ) and I'd like all the nodes to be selectable (p, div, etc..). Something like in firebug where if I click on a node I can get it's properties. Does anybody have an idea how to do that or where to start ?
hi,
I've a View page with all the content of my website (the node headers). When I click on one of these header I would like to load the complete node without refreshing the page and display it on the left.
Can I do this with Views (I mean.. does it have a functionality to load a complete node and add it to the current page ?
thanks
I've an h:dataTable to display my item information (in my case a customer support request) and for each row I'd like to put an h:inputText and h:commandButton to add a comment to the desired item. I've no problem with action, but my question is about the correct way to manage many h:inputText and related value on backbean.
I'm not sure that is correct to make all h:inputText set the value to the same backbean property. Any suggestions? Thanks all.
I have a few field in my entity that i wish to be non-editable. Looking in the docs it seems like "EditableAttribute" would do the trick. However this is only 4.0
Just wondering if there are other attributes that would have the desire effect. So be clear,
i have a field called "DateRegistered" i wish to display this as string not text field using "Html.EditorFor"
Hello Everyone,
I have anchor tag
<a id="click" href="javascript:void(0);" onclick="disable();" style="">Clickme</a>.
When html loads it showing clickme,when i click anchor link,it calls disable() function,In disable function i am trying to hide it using below code within the jquery success function:
document.getElementById("click").style.display='none';
But page never hides that anchor link,Please let me know if i am doing anything wrong.
Thanks in advance.