Sorting String Text
Hi,
I want to sort the following linesvar1, SUBJ, var13
var1, CHECK, var2
var13, CLAUSE-TYPE, decl
var1, PASSIVE, -
var2, _SUBCAT-FRAME, V-SUBJ-OBand this in a manner, that if the last substring (e.g. var2) ist equal to the first substring of the next line(s), he next line should be positioned after the first one.
The output should look like that:var1, sub, var13
var13, CLAUSE-TYPE, decl
var1, CHECK, var2
var2, _SUBCAT-FRAME, V-SUBJ-OB
var1, PASSIVE, -if somebody have an idea, I would be grateful.
Thank you
YouY wrote:
each line have three "elements" separated by a coma. The task ist to compare the thirth element of each line with the fist element of the next line, if they are equal thantprint the first one and than the second.
I hope it is clear now.A bit, yes. But why do you start with "var1, sub, var13" and not with "var1, CHECK, var2"?
Similar Messages
-
I have been searching high and low for this one. I have a vbscript that can successfully perform the function if one file is listed. It does a Wscript.echo on the results and if I run this via command using cscript, I can output to a text file
that way. However, I cannot seem to get it to work properly if I want it to search ALL the files in the folder. At one point, I was able to have it create the output file and appear as if it worked, but it never showed any results when the script
was executed and folder was scanned. So I am going back to the drawing board and starting from the beginning.
I also have a txt file that contains the list of string text entries I would like it to search for. Just for testing, I placed 4 lines of sample text and one single matching text in various target files and nothing comes back. The current script
I use for each file has been executed with a few hundred string text lines I want it to search against to well over one thousand. It might take awhile, but it works every time. The purpose is to let this run against various log files in a folder and
let it search. There is no deleting, moving, changing of either the target folder/files to run against, nor of the file that contains the strings to search for. It is a search (read) only function, going thru the entire contents of the folder and
when done, performs the loop function and onto the next file to repeat the process until all files are searched. When completed, instead of running a cscript to execute the script and outputting the results to text, I am trying to create that as part
of the overall script. Saving yet another step for me to do.
My current script is set to append to the same results file and will echo [name of file I am searching]: No errors found. Otherwise, the
output shows the filename and the string text that matched. Because the results append to it, I can only run the script against each file separately or create individual output names. I would rather not do that if I could include it all in one.
This would also free me from babysitting it and running each file script separately upon the other's completion. I can continue with my job and come back later and view the completed report all in one. So
if I could perform this on an entire folder, then I would want the entries to include the filename, the line number that the match occurred on in that file and the string text that was matched (each occurrence). I don't want the entire line to be listed
where the error was, just the match itself.
Example: (In the event this doesn't display correctly below, each match, it's corresponding filename and line number all go together on the same line. It somehow posted the example jumbled when I listed it)
File1.txt Line 54
Job terminated unexpectedly
File1.txt Line 58 Process not completed
File1.txt
Line 101 User input not provided
File1.txt
Line 105 Process not completed
File2.txt
No errors found
File3.txt
Line 35 No tape media found
File3.txt
Line 156 Bad surface media
File3.txt Line 188
Process terminated
Those are just random fake examples for this post.
This allows me to perform analysis on a set of files for various projects I am doing. Later on, when the entire search is completed, I can go back to the results file and look and see what files had items I wish to follow up on. Therefore, the
line number that each match was found on will allow me to see the big picture of what was going on when the entry was logged.
I actually import the results file into a spreadsheet, where further information is stored regarding each individual text string I am using. Very useful.
If you know how I can successfully achieve this in one script, please share. I have seen plenty of posts out there where people have requested all different aspects of it, but I have yet to see it all put together in one and work successfully.
Thanks for helping.I'm sorry. I was so consumed in locating the issue that I completely overlooked posting what exactly I was needing help with. I did have one created, but I came across one that seemed more organized than what I originally created. Later
on I would learn that I had an error in log location on my original script and therefore thought it wasn't working properly. Now that I am thinking that I am pretty close to achieving what I want with this one, I am just going to stick with it.
However, I could still use help on it. I am not sure what I did not set correctly or perhaps overlooking as a typing error that my very last line of this throws an "Expected Statement" error. If I end with End, then it still gives same
results.
So to give credit where I located this:
http://vbscriptwmi.uw.hu/ch12lev1sec7.html
I then adjusted it for what I was doing.
What this does does is it searches thru log files in a directory you specify when prompted. It looks for words that are contained in another file; objFile2, and outputs the results of all matching words in each of those log files to another file: errors.log
Once all files are scanned to the end, the objects are closed and then a message is echoed letting you know (whether there errors found or not), so you know the script has been completed.
What I had hoped to achieve was an output to the errors.log (when matches were found) the file name, the line number that match was located on in that file and what was the actual string text (not the whole line) that matched. That way, I can go directly
to each instance for particular events if further analysis is needed later on.
So I could use help on what statement should I be closing this with. What event, events or error did I overlook that I keep getting prompted for that. Any help would be appreciated.
Option Explicit
'Prompt user for the log file they want to search
Dim varLogPath
varLogPath = InputBox("Enter the complete path of the logs folder.")
'Create filesystem object
Dim oFSO
Set oFSO = WScript.CreateObject("Scripting.FileSystemObject")
'Creates the output file that will contain errors found during search
Dim oTSOut
Set oTSOut = oFSO.CreateTextFile("c:\Scripts\errors.log")
'Loop through each file in the folder
Dim oFile, varFoundNone
VarFoundNone = True
For Each oFile In oFSO.GetFolder(varLogPath).Files
'Verifies files scanned are log files
If LCase(Right(oFile.Name,3)) = "log" Then
'Open the log file
Dim oTS
oTS = oFSO.OpenTextFile(oFile.Path)
'Sets the file log that contains error list to look for
Dim oFile2
Set oFile2 = oFSO.OpenTextFile("c:\Scripts\livescan\lserrors.txt", ForReading)
'Begin reading each line of the textstream
Dim varLine
Do Until oTS.AtEndOfStream
varLine = oTS.ReadLine
Set objRegEx = CreateObject("VBScript.RegExp")
objRegEx.Global = True
Dim colMatches, strName, strText
Do Until oErrors.AtEndOfStream
strName = oFile2.ReadLine
objRegEx.Pattern = ".{0,}" & strName & ".{0,}\n"
Set colMatches = objRegEx.Execute(varLine)
If colMatches.Count > 0 Then
For Each strMatch in colMatches
strText = strText & strMatch.Value
WScript.Echo "Errors found."
oTSOut.WriteLine oFile.Name, varLine.Line, varLine
VarFoundNone = False
Next
End If
Loop
oTS.Close
oFile2.Close
oTSOut.Close
Exit Do
If VarFoundNone = True Then
WScript.Echo "No errors found."
Else
WScript.Echo "Errors found. Check logfile for more info."
End If
End if -
Looking to Search and Sort String Twice, though am having issues
I am inputing from an access file a test library, the files in the access file are out of alphabetical order...thus I search and sort and bring these into LV in alphabetical order. But I am running into the issue of trying to further search and sort the second column of info via the model number:
example:
Model ............. Model #
Zetor 55
Challenger 55
Ford 55
Zetor 66
Challenger 66
Ford 66
Zetor 45
Challenger 45
Ford 45
Zetor 96
Challenger 96
Ford 96
Need to Return the Files as per below:
Zetor 45
Challenger 45
Ford 45
Zetor 55
Challenger 55
Ford 55
Zetor 66
Challenger 66
Ford 66
Zetor 96
Challenger 96
Ford 96
Attachments:
search & sort string.JPG 65 KBactually in my original post I had a brain-lapse on what the final sort needed to be....
I was looking for this:
Challenger 45
Challenger 55
Challenger 66
Challenger 96 Ford 45
Ford 55
Ford 66
Ford 96
Zetor 45
Zetor 55
Zetor 66
Zetor 96
thanks for the quick response. -
How to change string text in xaml
I have string text in ListPickerItem like this
<toolkit:ListPicker x:Name="items" FullModeHeader="Items" Background="White" Margin="10,280,14,0" VerticalAlignment="Top" Foreground="Black" FontSize="25.333">
<toolkit:ListPicker.Header>
<TextBlock x:Name="Choose_Items" Opacity="0.8" Text="Choose Items" Foreground="White"/>
</toolkit:ListPicker.Header>
<corelib:String>item1</corelib:String>
<corelib:String>item2</corelib:String>
<corelib:String>item3</corelib:String>
<corelib:String>item4</corelib:String>
<corelib:String>item5</corelib:String>
<corelib:String>item6</corelib:String>
<corelib:String>item7</corelib:String>
<corelib:String>item8</corelib:String>
</toolkit:ListPicker>
So in code I want to change this text by the resource each string have another value like this
And the code is
Public Shared Iterator Function FindVisualChildren(ByVal obj As DependencyObject) As IEnumerable(Of DependencyObject)
If obj IsNot Nothing Then
For i As Integer = 0 To VisualTreeHelper.GetChildrenCount(obj) - 1
Dim child As DependencyObject = VisualTreeHelper.GetChild(obj, i)
If child IsNot Nothing Then
Yield child
End If
For Each subChild In FindVisualChildren(child)
Yield subChild
Next
Next
End If
End Function
Private Sub Change()
Dim rm As New ResourceManager("App.Resource1", GetType(MainPage).Assembly)
Dim main As Grid = ContentPanel
Dim result = FindVisualChildren(main)
Dim ST = result.OfType(Of String)()
For Each item In ST
item = rm.GetString(item.Text)
Next
End Sub
So How I can make right code to run like this problem ??
Thanks :)Hi Shay Boshra,
Based on your description, it seems that you want to change the ListPickerItem content based on the resource file, if I do not misunderstand you, an easy way to implement it is that first you can define the ListPicker as following:
In the MainPage.xaml:
<toolkit:ListPicker x:Name="items" Background="White" Margin="0,-11,24,0" VerticalAlignment="Top" Foreground="Black" FontSize="25.333">
<toolkit:ListPicker.Header>
<TextBlock x:Name="Choose_Items" Opacity="0.8" Text="Choose Items" Foreground="White"/>
</toolkit:ListPicker.Header>
<toolkit:ListPickerItem Content="item1"></toolkit:ListPickerItem>
<toolkit:ListPickerItem Content="item2"></toolkit:ListPickerItem>
<toolkit:ListPickerItem Content="item3"></toolkit:ListPickerItem>
<toolkit:ListPickerItem Content="item4"></toolkit:ListPickerItem>
<toolkit:ListPickerItem Content="item5"></toolkit:ListPickerItem>
</toolkit:ListPicker>
<Button Content="Change Text" HorizontalAlignment="Left" Margin="20,446,0,0" VerticalAlignment="Top" Click="Button_Click" Width="299"/>
In the MainPage.xaml.cs:
Private Sub Button_Click(sender As Object, e As RoutedEventArgs)
Dim ResourceManager As New ResourceManager("App.Resource1", GetType(MainPage).Assembly)
For Each listpickitem As ListPickerItem In items.Items
listpickitem.Content = ResourceManager.GetString(listpickitem.Content.ToString())
Next
End Sub
The result:
Best Regards,
Amy Peng
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
hi
when i insert string text in hebrew i see ????????? how to fix it ?
i work on:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
Oracle Developer ver. 2.1.1.64
thanksi try this, but still same problem :(
my Settings:
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET IW8MSWIN1255
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_RDBMS_VERSION 11.2.0.1.0 -
Here are the pre-processors:
#include <stdio.h>
#include <string.h>
Here are the global variables:
char output[999];
Here's the function to sort string to reverse order (I THINK THE PROBLEM IS HERE):
char output[999];
char *sort_reverse(const char *str)
int i, j = 0;
for (i = strlen(str); i > 0; i--)
output[j] = str[i];
j++;
return output;
And, function int main(void):
int main(void)
printf("Reverse of \"Hello\": %s\n", sort_reverse("Hello"));
return 0;
The output is:
Reverse of "Hello":
Why is that? how can i fix that?
Last edited by milo64 (2013-03-28 01:45:46)Instead of the global char output[999] wich is really big, you could allocate a perfectly sized array with calloc - like this in the sort_reverse function:
char *output = calloc(strlen(input_string), sizeof(char));
and in main program:
char *reversed_string = sort_reverse("Whatever");
printf("%s\n", reversed_string);
//Remember to free reversed_string with
free(reversed_string);
//Since its allocated in the heap with calloc()
Try check man-page for calloc, it will zero out the bytes aswell, then you wont have to worry about setting the last element to '\0'.
NOTE: you have to iterate with "strlen(input_string) - 1" otherwise you will overwrite the needed '\0'
EDIT: As strlen excludes the '\0' in original string, then you have to make space for that by adding one to strlen return value so:
char *output = calloc(strlen(input_string) + 1, sizeof(char));
Last edited by Boogie (2013-04-05 09:46:12) -
Sort strings. How to make it case-insensitive?
I wish to sort some String objects. TreeSet does it automatically, but letters are case-sensitive. Is there some static method that sorts Strings without regard to letter cases, so that "String B" will come between "String b" and "String C"?
SortedSet mySet = new TreeSet(String.CASE_INSENSITIVE_ORDER);
mySet.add("monkey");
mySet.add("Zebra");
mySet.add("Aardvark");
for(Iterator i = mySet.iterator(); i.hasNext(); ) {
System.out.println(i.next());
}I think you probably could have figured that out by looking at the API. -
Creating some sort of text template for multiple pictures
Hello, I'm new to the forums and new to photoshop elements. Let me lay out the situation so you have a better idea of what I'm trying to do and why. I work at a real estate office and we are going to hang a tv on the wall and display a slideshow of our homes for sale and ontop of the pictures I am going to add text to each photo with information about the home. I want to be able to add text in the same proportions in the same spot on each photograph. Is there some automatic way of doing this? I will have to hand type different info on each photo. The pictures come from different cameras (each agent takes their own photos) with different resolutions and doing it one by one (ive done just a few out of over a hundred so far) I'm finding out that one size text works on one but when I try to use the same size font on the next photo it's either too big or too small, I guess this is because of the different resolutions of each camera. I know I may have rambled a bit here but if anyone can point me in the right direction I'd be thankful.
If I need to clear up anything I've said let me know.
ThanksI believe you responded to the wrong posting. Mine is titled "Transferring from MyPictures "
Date: Thu, 17 Sep 2009 14:12:24 -0600
From: [email protected]
To: [email protected]
Subject: Re: Creating some sort of text template for multiple pictures
The font size is correlated with the resolution.
Have you investigated use of Powerpoint to construct a continuous-loop presentation?
"Self-running presentations are a great way to communicate information without having to have someone available to run a slide show. For example, you might want to set up a presentation to run unattended in a booth or kiosk at a trade show or convention. You can make most controls unavailable so that users can't make changes to the presentation. A self-running presentation restarts when it's finished and also when it's been idle on a manually advanced slide for longer than five minutes.
When designing a self-running presentation, you'll want to keep the setting in mind — for example, whether the booth or kiosk will be in an unmonitored public place or whether supervision will be available. The answer will help you determine what elements you add to your presentation, how much control you give users, and what steps you need to take to prevent misuse.
To set up a self-running show: open the presentation, click Set Up Show on the Slide Show menu, and then click Browsed at a kiosk (full screen). When you click this option, Loop continuously until "Esc" is automatically selected."
> -
Hi, I would appreciate if someone could assist with the following. On the Numbers application on my Ipad, the 'VALUE' function doesn't seem to work correctly on the string/text which I want to convert to a value. It gives me an error (in my example: 'VALUE requires a string specifying a number, but found "-14308.65" instead.'
The exact same document (if converted from Numbers to excel), displays the converted string/text correctly in MS Excel as a value though.click on the cell then in the formula bar and use the arrow keys to move the cursor to see if there are any other characters in the cell that could confuse the function. Also make sure the localization for your country is correct in System Prefs.
Maybe copy the EXACT contents of the cell and post here. -
Sort String Field Mandatory in Production Order Components Screen
Hi Gurus,
Am currently working on ECC 6.0 environment.
When I try to assign a batch to the components of the production order, the 'Sort String' is a mandatory field.
Can you please suggest from where is this mandatory field is picked? Is it possible to populate the field automatically? Or how to make the 'Sort String' field not mandatory?
In order type parameters (OPL8), standard parameters for display profiles are maintained.
Have also tried to maintain user parameters like F1F, S3F and S5F without success.
Your guidance please.
Thanks in advance.
The above mentioned problem does not occur if I try to create production order without reference of planned order using T Code CO01. This problem occurs only when I am converting planned order to production order.
Note that have tried maintaining sort string in the BoM. The sort string gets picked up when am creating manual production orders. Not copied when converting planned orders to production orders.
Tarang
Edited by: Tarang Machhar on Sep 28, 2010 7:23 PM
Edited by: Tarang Machhar on Sep 28, 2010 7:28 PMHi Tarang,
I think there is a transaction/screen variant maintained for that. Ask your ABAP team member to debug and check if there is any coding done to make it mandatory. There is no customizing for this one. There must be some code written to make it mandatory.
But you are correct, if you maintain the sort string in BOM, it gets copied on to the planned order, the reservation and the production order as well.
Regards,
Pradeep. -
Why are some sort order texts goasted rather then solid black?
To all and anyone
The subject says it all...
Why are some sort order texts ghosted rather then solid black?
Thanks!
FredThe ghosted/grayed values correspond with auto sorting. Auto sorting drops the leading articles, a/an/the, and variations in other languages, so that for example, The Beatles sorts as Beatles under B unless you explicitly override the auto sort by putting The Beatles in the sort value so that it sorts under T.
tt2 -
Sorting string by first character
What is the easiest way to sort strings by the first character? I can sort by a complete string match, but what I really want to do is just sort by the first letter of character. Is there a way to do something like a reverse concatenate?
Thank you
Danny
Danny
Attachments:
Sort string.vi 11 KBThis is one of those times where I think Regular Expressions can be of use.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Attachments:
Sort string_BD.png 26 KB -
Length of a string (text) in pixels.
I'm trying to locate a String's center on an exact position, drawing it to a JPanel. But since i don't know the exact length of the string, it's not that easy. Can anybody help me out there?
import java.awt.*;
import java.awt.event.*;
import java.awt.font.*;
import java.awt.geom.*;
import javax.swing.*;
public class CenteringStrings
public static void main(String[] args)
StringDemoPanel demo = new StringDemoPanel();
DemoActionPanel action = new DemoActionPanel(demo);
JFrame f = new JFrame("Centering Strings");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(action, "East");
f.getContentPane().add(demo);
f.setSize(500,300);
f.setLocation(200,200);
f.setVisible(true);
class StringDemoPanel extends JPanel
String text;
Font font;
final int
ASCENT = 0,
DESCENT = 1,
LEADING = 2,
BASELINE = 3;
int index = -1;
boolean sizeFlag, boundsFlag;
public StringDemoPanel()
text = "Centered text";
font = new Font("lucida sans oblique", Font.PLAIN, 36);
sizeFlag = false;
boundsFlag = false;
setBackground(Color.white);
public void paintComponent(Graphics g)
super.paintComponent(g);
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g2.setFont(font);
FontRenderContext frc = g2.getFontRenderContext();
LineMetrics lm = font.getLineMetrics(text, frc);
TextLayout tl = new TextLayout(text, font, frc);
int w = getWidth();
int h = getHeight();
float textWidth = (float)font.getStringBounds(text, frc).getWidth();
float ascent = lm.getAscent();
float descent = lm.getDescent();
float leading = lm.getLeading();
float height = lm.getHeight();
float x = (w - textWidth)/2;
float y = (h + height)/2 - descent;
g2.drawString(text, x, y);
// marker for string origin (x,y) on baseline
//g2.setPaint(Color.blue);
//g2.fill(new Ellipse2D.Double(x - 1, y - 1, 2, 2));
// physical space of text
Rectangle2D textSize = tl.getBounds();
textSize.setFrame(x, y - textSize.getHeight(),
textSize.getWidth(), textSize.getHeight());
// string bounds
Rectangle2D bounds = font.getStringBounds(text, frc);
bounds.setFrame(x, y - ascent - leading, bounds.getWidth(), bounds.getHeight());
switch(index)
case ASCENT:
Rectangle2D r1 = new Rectangle2D.Double(x, y - ascent, textWidth, ascent);
g2.setPaint(Color.magenta);
g2.draw(r1);
break;
case DESCENT:
Rectangle2D r2 = new Rectangle2D.Double(x , y, textWidth, descent);
g2.setPaint(Color.orange);
g2.draw(r2);
break;
case LEADING:
Rectangle2D r3 = new Rectangle2D.Double(x, y - ascent - leading,
textWidth, leading);
g2.setPaint(Color.yellow);
g2.draw(r3);
break;
case BASELINE:
Line2D line = new Line2D.Double(x, y, x + textWidth, y);
g2.setPaint(Color.blue);
g2.draw(line);
if(sizeFlag)
g2.setPaint(Color.green);
g2.draw(textSize);
System.out.println("above size = " + (int)textSize.getY() + "\n" +
"below size = " +
(int)(h - (textSize.getY() + textSize.getHeight())));
if(boundsFlag)
g2.setPaint(Color.red);
g2.draw(bounds);
System.out.println("above bounds = " + (int)bounds.getY() + "\n" +
"below bounds = " +
(int)(h - (bounds.getY() + bounds.getHeight())));
public void setIndex(int i)
index = i;
repaint();
public void setSizeFlag(boolean flag)
sizeFlag = flag;
repaint();
public void setBoundsFlag(boolean flag)
boundsFlag = flag;
repaint();
class DemoActionPanel extends JPanel
StringDemoPanel sdp;
JRadioButton
ascentButton, descentButton, leadingButton, baselineButton, clearButton;
JRadioButton[] buttons;
JCheckBox
sizeCheck, boundsCheck;
JCheckBox[] checks;
public DemoActionPanel(StringDemoPanel p)
sdp = p;
createComponents();
private void createComponents()
ascentButton = new JRadioButton("ascent");
descentButton = new JRadioButton("descent");
leadingButton = new JRadioButton("leading");
baselineButton = new JRadioButton("baseline");
clearButton = new JRadioButton("clear");
buttons = new JRadioButton[] {
ascentButton, descentButton, leadingButton, baselineButton, clearButton
ButtonGroup group = new ButtonGroup();
RadioButtonListener buttonListener = new RadioButtonListener();
setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.weighty = 1.0;
gbc.insets = new Insets(2,2,2,2);
gbc.gridwidth = gbc.REMAINDER;
gbc.anchor = gbc.WEST;
for(int i = 0; i < buttons.length; i++)
add(buttons, gbc);
group.add(buttons[i]);
buttons[i].addActionListener(buttonListener);
sizeCheck = new JCheckBox("text size");
boundsCheck = new JCheckBox("bounds");
checks = new JCheckBox[] { sizeCheck, boundsCheck };
CheckBoxListener checkBoxListener = new CheckBoxListener();
for(int i = 0; i < checks.length; i++)
add(checks[i], gbc);
checks[i].addActionListener(checkBoxListener);
private class RadioButtonListener implements ActionListener
public void actionPerformed(ActionEvent e)
JRadioButton button = (JRadioButton)e.getSource();
if(button == clearButton)
sdp.setIndex(-1);
return;
for(int i = 0; i < buttons.length; i++)
if(button == buttons[i])
sdp.setIndex(i);
break;
private class CheckBoxListener implements ActionListener
public void actionPerformed(ActionEvent e)
JCheckBox checkBox = (JCheckBox)e.getSource();
if(checkBox == sizeCheck)
sdp.setSizeFlag(sizeCheck.isSelected());
if(checkBox == boundsCheck)
sdp.setBoundsFlag(boundsCheck.isSelected()); -
Hello,
Someone asked me about the fiel Sort String in a BOM. I have seen it in a BOM layout but never know how this works and how to use it. I've read a little about it but not confident that I grasp a full understanding of it.
Could somebody please explain how this field is used and the benefits of using it? I would appreciate it if you could present a concrete example with a step by step so I could comprehend it well.
Thanks,
GIEI guess you're new to the forums, so in future use the search feature & you should find most of the queries asked earlier, as in this case.
To keep it simple its a field which you can use for sorting. Normally the sorting is done based on the item nos. so in many cases you might want to sort the components not just based on item nos. or material nos. but based on some logical connection between the components. So in that case you can specify the string and sort based on this column.
The benefit if I can say so is, it helps in visualization. Anyway the best way to understand is go to CS02, open some BOM in edit mode, maintain some sort strings, follow menu path Edit -> Sort -> Sort by sort string & check the results. -
When using a string text to a concatenate, is there any backslash code that will make the text bold in the string box? Sorry if this is a rookie question, but I just started with Lab View.
VeeJay wrote:
I get that the String indicator will show string or information in BOLD.
Which is because the Bol;d property is set for the string indicator, or are you using a Rich Text Box?
VeeJay wrote:
What if I want to send that string to a file or a balloonTip as BOLD characters?
To a file? Well... if it's a text file, you won't be able to set the bold property. If a RTF or DOC or other formatted file, then you would have to deal with how it requires to be done. The quick answer would be ActiveX.
What do you mean by baloonTip? (I know what it is, but are you referring to one from LV {tooltip} or another app?)
VeeJay wrote:
In essence, how to make the String Value completely in Bold font?
You would set it's property to bold. Again, are you referring to an indicator in LabVIEW or something else?
Maybe you are looking for
-
How can I surrend the focus of Jcombobox in Jtable?
There are a jcombobox for each row of a jtable. I can click each cell to choose some value from the item list of jcombobox. The problem is, when I import data into the table by changing the values of tablemodel, if some cell still hold the focus, the
-
Dear FI Experts, We currently using F110 for checks, we now want to use it for ACH, I already configure FBDZ, I have house bank, I already enter the bank information into the vendor master. I used F110 to pay a test vendor via ACH, it appears that it
-
The battery on my 2007 MacBook won't lift after unlocking latch. It seems to be stuck and rather sticky and therefore will not lift out to replace. What should I do?
-
When I swipe down the notification center, I can not find "tap to tweet" or "tap to post." How can I put it back?
-
I'm new to Numbers, and I am using the GPA calculator template. This includes 4 "terms" but I need 8. I have tried adding a new table but the formulas aren't included. How do I go about adding 4 new terms?