Search Results

Search found 5306 results on 213 pages for 'mark sp'.

Page 6/213 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Scala xhtml attribute breaks because of a question mark

    - by portoalet
    I had a problem with <iframe id="iframe1" src='http://stockcharts.com/h-sc/ui?s=MT&p=D&yr=2&mn=0&dy=0&id=p43321191731' width="300px" height="300px"></iframe> in Lift web framework (Scala) version Message: java.util.NoSuchElementException scala.RandomAccessSeq$$anon$13.next(RandomAccessSeq.scala:165) scala.xml.parsing.MarkupParser$class.normalizeAttributeValue(MarkupParser.scala:1191) It turned out the question mark ? in the iframe src attribute caused this. What can I do to fix this quickly?

    Read the article

  • XmlSerializer and Mark-up (Xml or Html)

    - by Kieron
    Hi, I've a requirement to serialize any class provided (decorated with the appropriate XmlElement/ XmlAttribute etc), but some of the properties may contain some sort of mark-up...usually HTML, but it could as easily be XML in the future. When trying to serialize the class the XmlSerializer crashes. I'd hope to be able to apply no more than an attribute to the property (currently set to XmlText) in the hope that it would wrap the content in CDATA[...], but that doesn't seem to work. I've seen several 'workarounds' like the one here, but I'd hoped for something a little less impactful for the developing consumer. Does anyone know of any 'nicer' less invasive solution...? Thanks, Kieron

    Read the article

  • SP Gridview link button column not working

    - by Dilse Naaz
    Hi I have one sharepoint custom page application which is rendering from a user control. In the user control page, i had used SPGridview for displaying data. My first column is Title Column (link button column), when the user click on the link, then one popup window will open with corresponding data. But the problem is the link button is not working properly. But this application is working as fine in asp.net application. My code is shown below.. <asp:UpdatePanel runat="server" ID="UpdatePanel2"> <ContentTemplate> <SharePoint:SPGridView ID="dgApplicationBox" CellPadding="0" Height="100%" runat="server" ForeColor="Black" Font-Size="10px" Font-Names="Verdana" AutoGenerateColumns="False" AllowPaging="True" Width="100%" BorderStyle="None" BorderWidth="0px" PageSize="10" BorderColor="White" BackColor="White" OnRowDataBound="dgApplicationBox_RowDataBound" DataKeyNames="ApplicationID" OnSelectedIndexChanged="dgApplicationBox_SelectedIndexChanged" OnPageIndexChanging="dgApplicationBox_PageIndexChanging" CssClass="ms-listviewtable" AlternatingRowStyle-CssClass="ms-alternating"> <SelectedRowStyle Font-Bold="True" ForeColor="Black" BackColor="#CE5D5A"></SelectedRowStyle> <EditRowStyle Font-Size="10px" Font-Names="Verdana,Arial,Helvetica,sans-serif"></EditRowStyle> <HeaderStyle Font-Size="11px" Height="20px" Font-Bold="True" ForeColor="Black" BackColor="#E7E8EC"> </HeaderStyle> <PagerStyle HorizontalAlign="Center" ForeColor="#414E61" Font-Size="5px" Font-Names="arial" Height="10px" BackColor="#EBF3FF"></PagerStyle> <RowStyle /> <Columns> <asp:TemplateField HeaderText="Title" HeaderStyle-CssClass="ms-vb"> <ItemTemplate> <asp:LinkButton ID="lbtnSubject" Text='<%# Bind("UDF5") %>' runat="server" OnClick="lbtnSubject_Click"></asp:LinkButton> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" CssClass="ms-vh2" Font-Bold="true" /> <ItemStyle HorizontalAlign="Left" CssClass="ms-vb2" /> </asp:TemplateField> <asp:TemplateField HeaderText="Request No."> <ItemTemplate> <asp:Label ID="lblReqNo" Text='<%# Bind("UDF1") %>' runat="server" /> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" CssClass="ms-vh2" Font-Bold="true" /> <ItemStyle HorizontalAlign="Left" CssClass="ms-vb2" /> </asp:TemplateField> <asp:BoundField DataField="CreatedOn" HeaderText="Created On" DataFormatString="{0:MM/dd/yyyy}" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"> <HeaderStyle CssClass="ms-vh2" Font-Bold="true"></HeaderStyle> <ItemStyle CssClass="ms-vb2"></ItemStyle> </asp:BoundField> <asp:BoundField DataField="Name" HeaderText="Form Type" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"> <HeaderStyle CssClass="ms-vh2" Font-Bold="true"></HeaderStyle> <ItemStyle CssClass="ms-vb2"></ItemStyle> </asp:BoundField> <asp:TemplateField HeaderText="History"> <HeaderStyle CssClass="ms-vh2" Font-Bold="true"></HeaderStyle> <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="21px" CssClass="ms-vb2"> </ItemStyle> <ItemTemplate> <asp:LinkButton ID="lbtnView" runat="server" OnClick="lbtnView_Click" >View</asp:LinkButton> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Application Id" Visible="False"> <ItemTemplate> <asp:Label ID="lblApplicationId" runat="server" Text='<%# Bind("ApplicationId") %>'></asp:Label> </ItemTemplate> <HeaderStyle HorizontalAlign="Left" CssClass="ms-vh2" Font-Bold="true" /> <ItemStyle HorizontalAlign="Left" CssClass="ms-vb2" /> </asp:TemplateField> </Columns> </SharePoint:SPGridView> </ContentTemplate> </asp:UpdatePanel> when the user click on the link button, this code will works.. try { clearSession(); Session["DigitalSignature"] = null; Button btnDetails = sender as Button; DataTable dt = (DataTable)dgApplicationBox.DataSource; GridViewRow gvRow = (GridViewRow)(sender as LinkButton).Parent.Parent; Session["AppId"] = ((Label)gvRow.FindControl("lblApplicationId")).Text; string subject = ((LinkButton)gvRow.FindControl("lbtnSubject")).Text; WFInfo objWFInfo = new WFInfo(); objWFInfo.InitWorkflowProperty(Convert.ToInt32(Session["AppId"].ToString()), Session["CurrentUser"].ToString()); Session["FormId"] = objWFInfo.FormID.ToString(); string strFilname = objWFInfo.GetFormName(objWFInfo.ApplicationCategoryID.ToString()); string WindowName = strFilname; strFilname += ".aspx"; Session["CategoryId"] = objWFInfo.ApplicationCategoryID.ToString(); //pnlSubmitModal_ModalPopupExtender.Show(); ScriptManager.RegisterStartupScript(this, this.GetType(), "starScript", "popUpWindow('" + strFilname + "?tittle=" + subject + "', 800, 690,'" + WindowName + "');", true); this.Controls.Add(new LiteralControl("<script>alert('hi');</script>")); if (Session["CurrentUser"] != null) { ApplicationForm objApplication = new ApplicationForm(); objApplication.markRead(Convert.ToInt32(Session["AppId"].ToString()), Session["CurrentUser"].ToString()); } bindFolderData(); } If i click on the link button, there will be only post back occuring. but not the popup window open.. Please help me for resolving this problem. thanks in advance..

    Read the article

  • Clear formatting in SP's PublishingWebControl RichHtmlField

    - by Scozzard
    Hi there, Is there a configurable way to include a "clean formatting" feature in Sharepoint's PublishingWebControls RichHtmlField? For example, if content is copied and pasted from Microsoft Word, there is a selectable option to remove all formatting of the pasted content or the content is stripped on the paste event. Have googled this for a bit, but to no avail.. Any help would be much appreciated :)

    Read the article

  • Open Source Queuing Solutions for peek, mark as done and then remove

    - by user330114
    I am looking at open source queuing platforms that allow me do the following: I have multiple producers, multiple consumers putting data into a queue in a multithreaded environment with the specific use case: I want the ability for consumers to be able do the following Peek at a message from the queue(which should mark as the message as invisible on the queue so that other consumers cannot consume the same message) The consumer works on the message consumed and if it is able to do the work successfully, it marks the message as consumed which should permanently delete it from the queue. If the consumer dies abruptly after marking the message as consumed or fails to acknowledge successful consumption after a certain timeout, the message is made visible on the queue again so that another consumer can pick it up. I've been looking at RabbitMQ, hornetQ, ActiveMQ but I'm not sure I can get this functionality out of the box, any recommendations on a system that gives me this functionality?

    Read the article

  • Migrating schema and SP from informix to mysql

    - by zombiegx
    We need to redo a database in MySQL that has been already done on Informix, is there a way to migrate not only the schema, but the stored procedures as well? Thanks. We have a client whom we built a web application that uses an Informix database. Now the client wants to be able to implement the same software but on multiple closed networks (like 20). Doing this using Informix would be very expensive (20 licences X_X). So the best approach is to redo the database on something like MySQL. The application was done using Flex, .Net (using ODBC) and Informix.

    Read the article

  • Databinding to type double - decimal mark lost

    - by user1277327
    I have a project where I'm databinding a gridview to a list, where one column is databound to a gridview. The problem I have is that with the double being 5.5 on one computer it appears as 5.5 in the gridview. But on another it looks like 55, the decimal mark dissapears. So 3.14 will look like 314 etc. The error occurs with the following code: myDatagrid.ItemsSource = someList; Binding binding = new Binding("DoubleValue"); myColumnInDatagrid.Binding = binding; I've also tried using a very simple valueconverter, that just return the double, and parsed it in ConvertBack. I'm pretty new to WPF so I'm sorry if I've made some obvious mistakes, I just don't understand why it works on one computer but not on the other. Perhaps it should be noted that both of the computers use the same operating system, with the same language settings (afaik at least).

    Read the article

  • Create view or SP, only if the DB contains a pattern

    - by Randall Salas
    Hi all: I am working on a script, that needs to be run in many different SQL servers. Some of them, shared the same structure, in other words, they are identical, but the filegroups and the DB names are different. This is because is one per client. Anyway, I would like when running a script, If I chose the wrong DB, it should not be executed. I am trying to mantain a clean DB. here is my example, which only works for dropping a view if exists, but does not work for creating a new one. I also wonder how it would be for creating a stored procedure. Thx a lot. if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ContentModDate]') and OBJECTPROPERTY(id, N'IsView') = 1) AND CHARINDEX('Content', DB_NAME()) 0 drop view [dbo].[ContentModDate] GO IF (CHARINDEX('Content', DB_NAME()) 0)BEGIN CREATE VIEW [dbo].[Rx_ContentModDate] AS SELECT 'Table1' AS TableName, MAX(ModDate) AS ModDate FROM Tabl1 WHERE ModDate IS NOT NULL UNION SELECT 'Table2', MAX(ModDate) AS ModDate FROM Table2 WHERE ModDate IS NOT NULL END END GO

    Read the article

  • How to mark empty in a single element in a float array

    - by Vineeth Mohan
    I have a large float (primitive) array and not every element in the array is filled. How can i mark a particular element as EMPTY. I understand this can be achieved by some special symbols but still i would like to know the standard way. Even if i am using some special symbol , how will i handle a situation where the actual data item is the value of special symbol. In short my question is how to implement the NULL feature in a primitive type array in java. PS - The reason why i am not using Float object is to achieve a high memory and speed performance. Thanks Vineeth

    Read the article

  • datagrid column custom check mark

    - by Berryl
    I want a read only column bound to a boolean that shows a check mark image when true and nothing when false. The problem is the false value; I just want to show whatever the background of the datagrid is, but I don't see how to clear the image source. What should the Value of the image source be to do this? Cheers, Berryl <DataGridTemplateColumn.CellTemplate> <DataTemplate> <Image Name="imgChecked" Source="\Img_Checkmark" /> <DataTemplate.Triggers> <DataTrigger Binding="{Binding IsPrimary}" Value="False"> <Setter TargetName="imgChecked" Property="Source" Value=""/> *** ??? *** </DataTrigger> </DataTemplate.Triggers> </DataTemplate> </DataGridTemplateColumn.CellTemplate>

    Read the article

  • Getting the rows cell to line up with parameters in a sp c# winform

    - by Yaron Buki
    I am using a datagridview on a win app designed in c#2010 express. In the _row leave event of my datagrid I would like to use the TableAdapter.usp_insert() that I created. But how does one match up the data in the cells of the datagridview row to the parameters in the stored procedure. Thanks in advance I appreciate the education. This is what if found so far! Int i; i = datagridview1.SelectedCells[0].RowIndex; ... .... Eventually string id = dataGridView1.Rows[i].cell[0].Value.ToString(); @para1 = id; Etc.. What do you think?

    Read the article

  • Cleaning up a SQL SP with Regex

    - by Douglas Osborne
    1) If I am running a find and replace in SQL 2005 - what would be the regular expression to find tab and space sequences ( or space and tab sequences ) and replace them with just tab? 2) If I have a line which begins with a space - is there a regular expression to convert that leading space to a tab? 3) What would be the regular expression to remove all of the spaces before a CR/LF in a SQL statement? TIA for the help - I know this will be trivial to most of you, Doug

    Read the article

  • Passing multiple parameters of same column to SQL Server select SP

    - by Bill
    I have a string value in the web.config — for example 2 guids seperated by a ",". I need to query the database dynamically (i.e i have no idea how many values could be seperated by a comma in the web.config) and run a select statement on the table passing these values and getting all that is relevant for example: select * from tablename where columnname = string1 string2 string3 etc etc some strings may only contain 1 guid some may contain 10

    Read the article

  • Selecting previous and next row using sp

    - by davor
    I want to select previous and next row from table based on current id. I send current id to stored procedure and use this query: -- previous select top 1 id from table where id < @currentId order by id desc -- next select top 1 id from table where id < @currentId order by id asc The problem is when I send currentId which is the last id in the table and want to select next row. Then is nothing selected. Same problem for previous row, when I send currentId which is first id in table Is it possible to solve this in sql without additional queries?

    Read the article

  • PHP - Store & Calculate the total mark from radio input

    - by user1806136
    I have designed a small web-based system that have a school evaluation form to ask specific users who can access the system" some questions and the input will be a radio type ( 1 or 2 or 3 or 4)! the code is working and can inserts the input into the database but i don't know the correct query to calculate the total mark and store it in the database, this is currently working code below: <?php session_start(); $Load=$_SESSION['login_user']; include('../connect.php'); $sql= "Select name from student where ID='$Load'"; $username = mysql_query($sql); $id=$_SESSION['login_user']; if (isset($_POST['submit'])) { $v1 = $_POST['v1']; $v2 = $_POST['v2']; $v3 = $_POST['v3']; $total = $_POST['total']; mysql_query("INSERT into Form1 (P1,P2,P3,TOTAL) values('$v1','$v2','$v3','$total')") or die(mysql_error()); header("Location: mark.php"); } ?> <html> <head> <?php if(!isset($_SESSION['login_user'])) header("Location:index.html"); ?> <title>Q&A Form</title> </head> <body> <center><form method="post" action="" > <table style="width: 20%" > <tr> <th> Criteria </th> <th> </th> </tr> <tr> <th> Excellent </th> <td > 4 </td> </tr> <tr> <th > Good <font size="3" > </font></th> <td> 3 <font size="4" > </font></td> </tr> <tr> <th > Average <font size="3" > </font></th> <td > 2 <font size="4" > </font></td> </tr> <tr> <th > Poor <font size="3" > </font></th> <td > 1 <font size="4" > </td> </tr> <font size='4'> <table style="width: 70%"> <tr> <th > School Evaluation <font size="4" > </font></th> <tr> <th > Criteria <font size="4" > </font></th> <th> 4<font size="4" > </font></th> <th> 3<font size="4" > </font></th> <th> 2<font size="4" > </font></th> <th> 1<font size="4" > </font></th> </tr> <tr> <th> Your attendance<font size="4" > </font></th> <td> <input type="radio" name ="v1" value = "4" checked = "checked" /></td> <td> <input type="radio" name ="v1" value = "3" /></td> <td> <input type="radio" name ="v1" value = "2" /></td> <td> <input type="radio" name ="v1" value = "1" /></td> </tr> <tr> <th > Your grades <font size="4" > </font></th> <td> <input type="radio" name ="v2" value = "4" checked = "checked" /></td> <td> <input type="radio" name ="v2" value = "3" /></td> <td> <input type="radio" name ="v2" value = "2" /></td> <td> <input type="radio" name ="v2" value = "1" /></td> </tr> <tr> <th >Your self-control <font size="4" > </font></th> <td> <input type="radio" name ="v3" value = "4" checked = "checked" /></td> <td> <input type="radio" name ="v3" value = "3" /></td> <td> <input type="radio" name ="v3" value = "2" /></td> <td> <input type="radio" name ="v3" value = "1" /></td> </tr> </tr> </table> <br> <a href="evaE.php"> <td><input type="submit" name="submit" value="Submit"> <input type="reset" name="clear" value="clear" style="width: 70px"></td> <?php $total = $v1+ $v2 + $v3; ?> </form> </center> </div> </body> </html> i used this query but it doesn't work out .. any help please? <?php $total = $v1+ $v2 + $v3; ?>

    Read the article

  • Why does a bash-zenity script has that title on Unity Panel and that icon on Unity Launcher?

    - by Sadi
    I have this small bash script which helps use Infinality font rendering options via a more user-friendly Zenity window. But whenever I launch it I have this "Color Picker" title on Unity Panel together with the icon assigned for "Color Picker" utility. I wonder why and how this is happening and how I can change it? #!/bin/bash # A simple script to provide a basic, zenity-based GUI to change Infinality Style. # v.1.2 # infinality_current=`cat /etc/profile.d/infinality-settings.sh | grep "USE_STYLE=" | awk -F'"' '{print $2}'` sudo_password="$( gksudo --print-pass --message 'Provide permission to make system changes: Enter your password to start or press Cancel to quit.' -- : 2>/dev/null )" # Check for null entry or cancellation. if [[ ${?} != 0 || -z ${sudo_password} ]] then # Add a zenity message here if you want. exit 4 fi # Check that the password is valid. if ! sudo -kSp '' [ 1 ] <<<"${sudo_password}" 2>/dev/null then # Add a zenity message here if you want. exit 4 fi # menu(){ im="zenity --width=500 --height=490 --list --radiolist --title=\"Change Infinality Style\" --text=\"Current <i>Infinality Style</i> is\: <b>$infinality_current</b>\n? To <i>change</i> it, select any other option below and press <b>OK</b>\n? To <i>quit without changing</i>, press <b>Cancel</b>\" " im=$im" --column=\" \" --column \"Options\" --column \"Description\" " im=$im"FALSE \"DEFAULT\" \"Use default settings - a compromise that should please most people\" " im=$im"FALSE \"OSX\" \"Simulate OSX rendering\" " im=$im"FALSE \"IPAD\" \"Simulate iPad rendering\" " im=$im"FALSE \"UBUNTU\" \"Simulate Ubuntu rendering\" " im=$im"FALSE \"LINUX\" \"Generic Linux style - no snapping or certain other tweaks\" " im=$im"FALSE \"WINDOWS\" \"Simulate Windows rendering\" " im=$im"FALSE \"WIN7\" \"Simulate Windows 7 rendering with normal glyphs\" " im=$im"FALSE \"WINLIGHT\" \"Simulate Windows 7 rendering with lighter glyphs\" " im=$im"FALSE \"VANILLA\" \"Just subpixel hinting\" " im=$im"FALSE \"CLASSIC\" \"Infinality rendering circa 2010 - No snapping.\" " im=$im"FALSE \"NUDGE\" \"Infinality - Classic with lightly stem snapping and tweaks\" " im=$im"FALSE \"PUSH\" \"Infinality - Classic with medium stem snapping and tweaks\" " im=$im"FALSE \"SHOVE\" \"Infinality - Full stem snapping and tweaks without sharpening\" " im=$im"FALSE \"SHARPENED\" \"Infinality - Full stem snapping, tweaks, and Windows-style sharpening\" " im=$im"FALSE \"INFINALITY\" \"Infinality - Standard\" " im=$im"FALSE \"DISABLED\" \"Act without extra infinality enhancements - just subpixel hinting\" " } # option(){ choice=`echo $im | sh -` # if echo $choice | grep "DEFAULT" > /dev/null; then sudo -Sp '' sed -i "s/USE_STYLE=\"${infinality_current}\"/USE_STYLE=\"DEFAULT\"/g" '/etc/profile.d/infinality-settings.sh' <<<"${sudo_password}" fi # if echo $choice | grep "OSX" > /dev/null; then sudo -Sp '' sed -i "s/USE_STYLE=\"${infinality_current}\"/USE_STYLE=\"OSX\"/g" '/etc/profile.d/infinality-settings.sh' <<<"${sudo_password}" fi # if echo $choice | grep "IPAD" > /dev/null; then sudo -Sp '' sed -i "s/USE_STYLE=\"${infinality_current}\"/USE_STYLE=\"IPAD\"/g" '/etc/profile.d/infinality-settings.sh' <<<"${sudo_password}" fi # if echo $choice | grep "UBUNTU" > /dev/null; then sudo -Sp '' sed -i "s/USE_STYLE=\"${infinality_current}\"/USE_STYLE=\"UBUNTU\"/g" '/etc/profile.d/infinality-settings.sh' <<<"${sudo_password}" fi # if echo $choice | grep "LINUX" > /dev/null; then sudo -Sp '' sed -i "s/USE_STYLE=\"${infinality_current}\"/USE_STYLE=\"LINUX\"/g" '/etc/profile.d/infinality-settings.sh' <<<"${sudo_password}" fi # if echo $choice | grep "WINDOWS" > /dev/null; then sudo -Sp '' sed -i "s/USE_STYLE=\"${infinality_current}\"/USE_STYLE=\"WINDOWS\"/g" '/etc/profile.d/infinality-settings.sh' <<<"${sudo_password}" fi # if echo $choice | grep "WIN7" > /dev/null; then sudo -Sp '' sed -i "s/USE_STYLE=\"${infinality_current}\"/USE_STYLE=\"WINDOWS7\"/g" '/etc/profile.d/infinality-settings.sh' <<<"${sudo_password}" fi # if echo $choice | grep "WINLIGHT" > /dev/null; then sudo -Sp '' sed -i "s/USE_STYLE=\"${infinality_current}\"/USE_STYLE=\"WINDOWS7LIGHT\"/g" '/etc/profile.d/infinality-settings.sh' <<<"${sudo_password}" fi # if echo $choice | grep "VANILLA" > /dev/null; then sudo -Sp '' sed -i "s/USE_STYLE=\"${infinality_current}\"/USE_STYLE=\"VANILLA\"/g" '/etc/profile.d/infinality-settings.sh' <<<"${sudo_password}" fi # if echo $choice | grep "CLASSIC" > /dev/null; then sudo -Sp '' sed -i "s/USE_STYLE=\"${infinality_current}\"/USE_STYLE=\"CLASSIC\"/g" '/etc/profile.d/infinality-settings.sh' <<<"${sudo_password}" fi # if echo $choice | grep "NUDGE" > /dev/null; then sudo -Sp '' sed -i "s/USE_STYLE=\"${infinality_current}\"/USE_STYLE=\"NUDGE\"/g" '/etc/profile.d/infinality-settings.sh' <<<"${sudo_password}" fi # if echo $choice | grep "PUSH" > /dev/null; then sudo -Sp '' sed -i "s/USE_STYLE=\"${infinality_current}\"/USE_STYLE=\"PUSH\"/g" '/etc/profile.d/infinality-settings.sh' <<<"${sudo_password}" fi # if echo $choice | grep "SHOVE" > /dev/null; then sudo -Sp '' sed -i "s/USE_STYLE=\"${infinality_current}\"/USE_STYLE=\"SHOVE\"/g" '/etc/profile.d/infinality-settings.sh' <<<"${sudo_password}" fi # if echo $choice | grep "SHARPENED" > /dev/null; then sudo -Sp '' sed -i "s/USE_STYLE=\"${infinality_current}\"/USE_STYLE=\"SHARPENED\"/g" '/etc/profile.d/infinality-settings.sh' <<<"${sudo_password}" fi # if echo $choice | grep "INFINALITY" > /dev/null; then sudo -Sp '' sed -i "s/USE_STYLE=\"${infinality_current}\"/USE_STYLE=\"INFINALITY\"/g" '/etc/profile.d/infinality-settings.sh' <<<"${sudo_password}" fi # if echo $choice | grep "DISABLED" > /dev/null; then sudo -Sp '' sed -i "s/USE_STYLE=\"${infinality_current}\"/USE_STYLE=\"DISABLED\"/g" '/etc/profile.d/infinality-settings.sh' <<<"${sudo_password}" fi # } # menu option # if test ${#choice} -gt 0; then echo "Operation completed" fi # exit 0

    Read the article

  • Mark duplicates in MySql with php (without deleting)

    - by Adam
    So, I'm having some problems with a MySQL query (see other question), and decided to try a different approach. I have a database table with some duplicate rows, which I actually might need for future reference, so I don't want to remove. What I'm looking for is a way to display the data without those duplicates, but without removing them. I can't use a simple select query (as described in the other question). So what I need to do is write a code that does the following: 1. Go through my db Table. 2. Spot duplicates in the "ip" column. 3. Mark the first instance of each duplicate with "0" (in a column named "duplicate") and the rest with "1". This way I can later SELECT only the rows WHERE duplicate=0. NOTE: If your solution is related to the SELECT query, please read this other question first - there's a reason I'm not just using GROUP BY / DISTINCT. Thanks in advance.

    Read the article

  • Mark text in HTML

    - by Alon
    Hi I have some plain text and html. I need to create a PHP method that will return the same html, but with <span class="marked"> before any instances of the text and </span> after it. Note, that it should support tags in the html (for example if the text is blabla so it should mark when it's bla<b>bla</b> or <a href="http://abc.com">bla</a>bla. It should be incase sensitive and support long text (with multilines etc) either. For example, if I call this function with the text "my name is josh" and the following html: <html> <head> <title>My Name Is Josh!!!</title> </head> <body> <h1>my name is <b>josh</b></h1> <div> <a href="http://www.names.com">my name</a> is josh </div> <u>my</u> <i>name</i> <b>is</b> <span style="font-family: Tahoma;">Josh</span>. </body> </html> ... it should return: <html> <head> <title><span class="marked">My Name Is Josh</span>!!!</title> </head> <body> <h1><span class="marked">my name is <b>josh</b></span></h1> <div> <span class="marked"><a href="http://www.names.com">my name</a> is josh</span> </div> <span class="marked"><u>my</u> <i>name</i> <b>is</b> <span style="font-family: Tahoma;">Josh</span></span>. </body> </html> Thanks.

    Read the article

  • Thread to receive the messages from serial port is not working using c#

    - by karthik
    I am using Serial port to receive the messages. The below function is running in a thread. When i debug i find that the thread is running properly. But "if (sp.IsOpen)" is always false, due to which the code is not executing inside the IF condition at all. It says the Port is closed. I will be having multiple serial ports in my system and i will not know, which port will receive the message. So i need to listen to all the ports in one Thread. How can i solve my problem here ? private void ListenerPorts() { log.Info("Listening Thread Started"); while (true) { //foreach (SerialPort sp in storeport) foreach (SerialPort sp in comPortsList) { if (sp.IsOpen) { sp.ReadTimeout = readTimeoutInMs; sp.WriteTimeout = writeTimeoutInMs; try { string msg = sp.ReadLine(); this.GetMessageRichTextBox("Message : " + msg + "\n"); sp.WriteLine(sp.PortName); if (msg.Contains("COM")) { // is AutoScan receiverPortName = sp.ReadLine(); this.updateLblStatusRichTextBox(sp.PortName + " is connected to " + msg + "\n"); } else { //standalone is uppercase ReceiverPortName = sp.ReadLine(); this.updateLblStatusRichTextBox(sp.PortName + " is connected to " + ReceiverPortName + "\n"); } } catch (Exception ex) { // no data System.Diagnostics.Debug.WriteLine(sp.PortName + " : " + ex.Message); } } } } }

    Read the article

  • assembly of pdp-11(simulator)

    - by lego69
    I have this code on pdp-11 tks = 177560 tkb = 177562 tps = 177564 tpb = 177566 lcs = 177546 . = torg + 2000 main: mov #main, sp mov #kb_int, @#60 mov #200, @#62 mov #101, @#tks mov #clock, @#100 mov #300, @#102 mov #100, @#lcs loop: mov @#tks,r2 aslb r2 bmi loop halt clock: tst bufferg beq clk_end mov #msg,-(sp) jsr pc, print_str tst (sp)+ clr bufferg bic #100,@#tks clr @#lcs clk_end:rti kb_int: mov r1,-(sp) jsr pc, read_char movb r1,@buff_ptr inc buff_ptr bis #1,@#tks cmpb r1,#'q bne next_if mov #0, @#tks next_if:cmpb r1,#32. bne end_kb_int clrb @buff_ptr mov #buffer,-(sp) jsr pc, print_str tst (sp)+ mov #buffer,buff_ptr end_kb_int: mov (sp)+,r1 rti ;############################# read_char: tstb @#tks bpl read_char movb @#tkb, r1 rts pc ;############################# print_char: tstb @#tps bpl print_char movb r1, @#tpb rts pc ;############################# print_str: mov r1,-(sp) mov r2,-(sp) mov 6(sp),r2 str_loop: movb (r2)+,r1 beq pr_str_end jsr pc, print_char br str_loop pr_str_end: mov (sp)+,r2 mov (sp)+,r1 rts pc . = torg + 3000 msg:.ascii<Something is wrong!> .byte 0 .even buff_ptr: .word buffer buffer: .blkw 3 bufferg: .word 0 Can somebody please explain how this part is working, thanks in advance movb r1,@buff_ptr inc buff_ptr bis #1,@#tks cmpb r1,#'q bne next_if mov #0, @#tks next_if:cmpb r1,#32. bne end_kb_int clrb @buff_ptr mov #buffer,-(sp) jsr pc, print_str tst (sp)+ mov #buffer,buff_ptr

    Read the article

  • ListView with button and check mark?

    - by jgelderloos
    So I have looked through a lot of other answers but have not been able to get my app to work how I want it. I basically want the list view that has the text and check mark to the right, but then an addition button to the left. Right now my list view shows up but the check image is never changed. Selector: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_selected="true" android:drawable="@drawable/accept_on" /> <item android:drawable="@drawable/accept" /> </selector> Row xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layout" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="10dp" android:background="#EEE"> <ImageButton android:id="@+id/goToMapButton" android:src="@drawable/go_to_map" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="left" /> <TextView android:id="@+id/itemName" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_vertical" android:textColor="#000000" android:layout_marginTop="5dp" android:layout_marginBottom="5dp" android:layout_weight="1" /> <Button android:id="@+id/checkButton" android:background="@drawable/item_selector" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" /> </LinearLayout> MapAdapter: import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.TextView; public class MapAdapter extends ArrayAdapter<String>{ Context context; int layoutResourceId; String data[] = null; LayoutInflater inflater; LinearLayout layout; public MapAdapter(Context context, int layoutResourceId, String[] data) { super(context, layoutResourceId, data); this.layoutResourceId = layoutResourceId; this.context = context; this.data = data; inflater = LayoutInflater.from(context); } @Override public String getItem(int position) { return data[position]; } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder = new ViewHolder(); if(convertView == null) { convertView = inflater.inflate(R.layout.map_item_row, null); layout = (LinearLayout)convertView.findViewById(R.id.layout); holder.map = (ImageButton)convertView.findViewById(R.id.goToMapButton); holder.name = (TextView)convertView.findViewById(R.id.itemName); //holder.check = (Button)convertView.findViewById(R.id.checkButton); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } layout.setBackgroundColor(0x00000004); holder.name.setText(getItem(position)); return convertView; } static class ViewHolder { ImageButton map; TextView name; Button check; } }

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >