|
In angular 2 we use plain select with *ngFor directive.
<select class="form-control" [(ngModel)]="model.selectedId" name="type">
<option *ngFor="let item of myArray" value="{{item.id}}">
{{item.name}}
</option>
</select>
Life is a computer program and everyone is the programmer of his own life.
|
|
|
|
|
I am a Webdesigner with minor experience in C++, Phython, Java and VBA for offline applications who wants to broaden his horizons.
My task was to build a Website where Users can online "preflight" PDF´s (only the most simple things like format and correct bleed).
So I researched how something like this can be achieved, or how such a "service" in general can be integrated into the web.
I stumpled upon things like SOAP, REST and ASP.NET. Now I am totally confused, can someone explain to me what the way to go is, if I have to programm such "webservices" where i need extra and complex funtionality that is handled on a server? (Another example would be a Service that changes the Format of a MP3 or something like that)
I am sorry if this question may sound stupid to some of you.
Greetings
|
|
|
|
|
Hello everyone,
I have a little problem while coding an e-commerce site, built on symfony3.
Here is an overview of my used table on mysql-side: [^]
As shown here, there is only one table where i am selecting the data from. No annoying joins between multiple tables which may slow down speed.
Here is a little mockup to show the actual status quo of what i want to render: [^]
The Usecase is to get a filtered product view (for example "give me all products where color is green"). Then you get all products listet (red area) + on sidebar the possibility to set further filters for filtering stuff like the brand or size (yellow area; in practical there are even some more filter to use).
The Problem now is, as you see, each result i have to use another adjusted query (for the sidebar different "GROUP BY" statements) with always the same subquery which represents the actual selected productcollection.
This is slowing down my site extremely heavy (as there are over 1 million products in the database as i need about 7-8 times the same query with a little bit different parameters every time).
I found the solution that it would be better to switch to MariaDB, so it would be possible to cache all the subqueries. That is not possible on the actual environment i am working on. MySQL caching is activated here.
Does anyone can give me some hints what i can do to minimize the the queries or mainly speed up the whole process when generating the data for the view? Is there any better solution as I do actually? I guess so..
Many thanks in advance for your help and ideas!
|
|
|
|
|
Member 12818964 wrote: No annoying joins between multiple tables which may slow down speed.
That's quite a bold claim. What evidence do you have to back that up?
Most systems are built on a normalized database, and use joins between related tables without any problems. If anything, it tends to speed up your queries - it's quicker to compare equality with a surrogate integer key that a string.
Your best bet is probably to profile your queries, to see if there are any missing indexes which might improve the performance.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I currently have a 2010 web form application that generates html code when the application has finished executing. My requirement is that I make a second copy of the same html so a new letter can be generated. The only difference from letter #1 to letter #2 is the mailing address of the letters will be different. The rest of the letter will be exactly the same.
My problem is when I actually have a copy of the letter, I have it completely. I do not have a copy of what the original address is. Thus when I am going to replace the address for the second letter, I need a way to be able to tell where the address of the first letter is located at.
Thus my questions are:
1. Thus I am thinking I can place some invisible characters around the first address that the user will not see. This way I will be able to replace the address in the second copy of the letter with the second address I want to embed. Thus are there invisible html characters that I can embed around address 1 in the first letter so that I can place a new address in the second copy of the letter? If so can you tell me what those invisible characters are that I can use?
2. If there are no invisible characters that I can use, are there other html tags that I can use to place around the original address that the user will not see? Thus when I am working with the second copy of the letter, I can do the search and replace for these other html tags and place the second address in the second letter> Thus can you tell me what the other characters are?
3. If my ideas listed above do not work, do you have any other suggestions that I can Use? If so, would you tell me how to accomplish my goal using your suggestion?
|
|
|
|
|
Not sure exactly what you are trying to do, but you could always surround the text you want to manipulate in <span class="stuffToChange"> ... </span> tags. That won't affect the rendering (assuming you don't have stuffToChange in your CSS). I wouldn't recommend using "invisible" characters.
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
I like your idea of using the span tags. Could I use any other html tags and if so what other html tags could I use?
Could you tell me why using an invisible html characters are not a good idea?
|
|
|
|
|
There might be other html tags that you could coerce, but <span> is the natural one for the job. Google "html span" to see why.
Using invisible characters has a couple of problems:
1. What if the "invisible" character (e.g. ) could appear legitimately in the document?
2. The intention of your invisible characters is not clear to anyone looking at your code*, whereas using <span> makes it obvious what you are trying to do.
* such as yourself a year or two into the future
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Hi, I tried to make something like pinterest.
I want to remove this gap (Pointed by black arrow)
Click here to view image[^]
This is my CSS for container
.fokus-news
{
-webkit-border-radius: 8;
-moz-border-radius: 8;
border-radius: 8px;
border: solid #C40000 1px;
width: 250px;
padding: 5px;
display: inline-block;
margin: 10px;
vertical-align: top;
}
|
|
|
|
|
Hello dear everyone,
I am creating a dropdown menu on my webpage (ASP.Net) but it seems that CSS for dropdown menu not to work for me.
My coding goes here, check this link Edit fiddle - JSFiddle[^]
I am not sure which part that causing it not to work. I viewed some sample from internet but I just don't get the mistake that I've done in my coding.
Looking for your help. Thank you very much.
modified 20-Oct-16 23:59pm.
|
|
|
|
|
First off, explain what is happening and what you expect to happen, instead of just saying "it doesn't work."
Secondly, you have overflow hidden on your ul which is hiding your items.
Since you did not explain what you want to have happen, I'm not sure what else to tell you.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hello, thank you for replying. I solved the issue. As for result here was the coding i used :
ASP.Net html
<ul class="menu">
<li><a href="#">Home</a></li>
<li><a href="#">Daily Upload</a></li>
<li><a href="#">Report
<img id="arrow" style="float: right; padding-top: 5px;" src="source/arrow.gif" /></a>
<ul>
<li><a href="#">Daily report by branch</a></li>
<li><a href="#">Monthly report</a></li>
</ul>
</li>
<li><a href="#">Logout</a></li>
</ul>
CSS
ul.menu > li {
position: relative;
left: -40px;
width: 15%;
list-style-type: none;
float: left;
}
ul.menu ul{
display: none;
position: relative;
list-style-type: none;
z-index: 10;
}
ul.menu > li:hover ul {
display: block;
background-color: #fff;
padding: 0;
margin: 0;
}
li a {
border: 0.5px solid #bdbdbd;
display: block;
text-align: left;
padding: 5px 25px;
}
li a:hover {
background-color: #f44336;
color: white!important;
font-weight: bold;
}
li a.active {
background-color: #f44336!important;
color: white!important;
font-weight: bold;
}
Javascript
$(function () {
var selector = '.menu li a';
$(selector).on('click', function () {
$(selector).removeClass('active');
$(this).addClass('active');
});
});
|
|
|
|
|
I basically want to know about making a site which doesn't look messy, and for that, i don't want to divide it in some predefined portion.
i don't want to use table while making the index page.
give some hint for another way to do it.
|
|
|
|
|
Use divs.
Member 12793870 wrote: which doesn't look messy, Regardless of which approach you use, anything can look messy.
Perhaps you should design it out on paper first or google for free web templates to get some ideas for what you want to do.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
If you don't want to use a table, then don't use a table. There are plenty of better ways to lay out your page.
Since it sounds like you're new to web design, you might want to start out with a framework. It's not quite as flexible as rolling your own styles, but it will probably get you up and running faster.
For example:
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
Can any Body tell me if i want to expert in Android Development which java concepts I need to focus
|
|
|
|
|
|
Member 12229102 wrote: Can any Body tell me if i want to expert in Android Development which java concepts I need to focus The most accurate answer we can give is "all of them." But it will depend on what you end up doing. If you never need to access a db, then you won't need that. But we have no idea what code you will be or won't be doing.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Thank you for your support
|
|
|
|
|
When I request a .aspx page that is not on our site, I get redirected to a custom error page which is the designed behavior. When I request a pdf that is not on our site, however, I get a generic 404 error. My web.config has the following:
<customErrors mode="RemoteOnly" defaultRedirect="default.aspx">
<error statusCode="403" redirect="dcg/PageNotFound.aspx" />
<error statusCode="404" redirect="dcg/PageNotFound.aspx" />
</customErrors>
On top of this, when I do get redirected to "dcg/PageNotFound.aspx" page, the browser is appending the page to itself over and over like it's in a continual error loop. I don't understand why this is happening. Any help would be appreciated.
|
|
|
|
|
I found the continual loop problem. It was an Ajax call. I still do not know why I get the generic 404 when a pdf is requested.
|
|
|
|
|
Problem solved. After reading a number of articles, I saw mention of how a global.asax page can be used to handle errors. Now, when a pdf is requested and it's not on our site, the 404 is handled correctly.
|
|
|
|
|
Sorry experts if this is cheap question.
I have been struggling to get a handle on responsive web design and have been scouring the web for useful information.
Even though there is a lot of stuff out there, I keep running into the following:
<link rel="stylesheet" type="text/css" media="screen and (max-device-width: 320px)" href="style320.css" />
<link rel="stylesheet" type="text/css" media="screen and (max-device-width: 544px)" href="style544.css" />
<link rel="stylesheet" type="text/css" media="screen and (max-device-width: 768px)" href="style768.css" />
<link rel="stylesheet" type="text/css" media="screen and (max-device-width: 992px)" href="style992.css" />
<link rel="stylesheet" type="text/css" media="screen and (max-device-width: 1200px)" href="style1200.css" />
My question is, where do I find the css files for instance style320.css, style544.css, etc?
I am essentially trying to convert the following html into responsive login page but nothing I have tried so far seems to be worked when I view the page on iphone.
<form id="FormToValidate" method="POST" action="verify_login.php">
<table width="560px" align="center">
<tr>
<td width="100%"><img id="Img2" src="images/welcome.gif" alt="" runat="server" /></td>
</tr>
<tr>
<td>
<span style="color:red;font-weight:bold;">INSTRUCTIONS:</span> To log into the screen, you will need to sign in with your .....</span>.
</td></tr><tr><td> </td></tr>
<td>
<span style="background-color:Yellow;"> eg: *****</span>
</td>
</tr>
<tr>
<td width="100%"><img id="Img1" src="images/line.gif" alt="" runat="server" /></td>
</tr>
</table>
<table>
<tr>
<td nowrap>
<div class="input text">
<label>User Name:</label>
<input maxlength="40" class="required" name="user" id="user" size="20" placeholder="Enter username!" type="text" title="Please enter a username." tabindex="2" value="" style="width:400px;color:#000;font-size:10pt;height:20px;" />
</div>
</td>
</tr>
<tr>
<td nowrap>
<div class="input text">
<label>Password:</label>
<input maxlength="40" class="required" name="pass" id="pass" size="20" placeholder="Enter password!" type="password" tabindex="3" title="Please enter a password." value="" style="width:400px;color:#000;font-size:10pt;height:20px;" />
</div>
</td>
</tr>
<tr>
<td></td>
<td>
<div class="buttonSubmit">
<input type="submit" id="btnValidate" style="width:80px; margin-left:-152px;" value="Log in >>" />
</div><br clear="all"/>
</td>
</tr>
</table>
</form>
Thanks a lot in advance
|
|
|
|
|
Since there's no path specified in the href attribute, you find them in the same folder as your HTML / PHP file. If they don't exist, then you need to create them.
This example appears to be using a desktop-first approach, meaning that the styles in styleX.css only apply to screens up to Xpx wide. You would also need to have a base stylesheet with no media query, which would provide the base styles, and the styling for screens larger than your maximum breakpoint (1200px ).
The alternative is to use a mobile-first approach; your base styles provide the styling for mobile devices, and you then use media queries with min-width / min-device-width to override the styling for larger screens.
You don't have to use separate stylesheet files; you can do it all in one:
@media screen and (max-device-width: 320px) {
}
@media screen and (max-device-width: 544px) {
}
...
NB: You'll struggle to make that form responsive as-is. You've used <table> s for layout, and you have fixed widths in inline styles. You've also used a negative margin to shift the button. You'll need to change the markup before you start trying to apply a responsive design to it.
Google has plenty of examples of creating a responsive login form, which would probably be a better place to start.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|