using LoadSTL() function - battery

I what to convert .STL file to .mat to simulate object in m file in matlab. I am call the function like this way
LoadSTL('F:\D Backup\najib\FYP\Dr istaz\matlab_sim_02\matlab_sim\quadfullprt.STL')
but I get this error:
**File format in an unexpected type.
Check the file specified is an STL format file with ASCII formatting.
(Error - number of vertices not a multiple of 3)
Attempt to reference field of non-structure array.
Error in LoadSTL (line 58)
disp(numel(points.x))
Error in mainCoverter (line 3)
LoadSTL('F:\D Backup\najib\FYP\Dr istaz\matlab_sim_02\matlab_sim\quadfullprt.STL')**
how can I resolve this? thanks in advance

Try opening the STL file in a viewing program like MeshLab (it's free and will open STL files), then save it as a new STL file but being sure to check ASCII format instead of binary. This might be a checkbox or it may be a separate file-type in the pull-down menu. For example, in MeshLab, after selecting STL and clicking "save", a new menu will pop up with extra options where you can de-select "Binary encoding".

Related

How do I tell PowerPoint to map two placeholders when switching slide layouts?

I start with a working example:
Open PowerPoint with a blank presentation.
Right-click the title slide and choose "Layout - Title and Content".
You see "• Click to add text"? Click and add some text.
Right-click the slide again and choose "Layout - Two Content".
See how smart PowerPoint can be?
The text you entered in the single placeholder before is now in one the of two placeholders.
Specifically, the left one.
My questions:
Why? (And not in an extra one?)
Why? (And not in the right one?)
My questions arises because I have received a set of master slides in which the above is not working, and I am trying to repair it without having to regenerate everything.
This is a site for programming issues, but the background behind this issue might be sufficiently complex. Modern PowerPoint files are XML. In the XML for each slide layout, each placeholder has an idx reference number. PowerPoint uses these on numbers to decide where to place content.
Lazy Designer Syndrome is the cause of what you're seeing. Instead of creating new placeholders in order, so the idx numbers would increment in a logical order, the designer has copied and pasted placeholders to avoid extra formatting work. The pasted placeholders all have the same idx number. As a result, PowerPoint has no idea of placeholder order and inserts content randomly.
This isn't always easy to solve without editing the XML, but you can try deleting all but the leftmost placeholder. Then create new placeholders by inserting them one at a time and reformatting them manually to match the first.
At first my attempts to follow the above failed, but now I got it working as well.
There are two different, but similar tags, id="" and idx="".
All objects in the slide has an id="" tag, this is not the tag to solve this problem.
The idx="" tag is only on Placeholder objects, except the those of Type=Title.
As described above you can set it to an integer value 1 and greater (I assume).
Make a plan for what Placeholder objects should be replaced across your layouts. I think of these as "groups" or "families", then assign the idx-values consistently throughout your slide layouts.
These "groups" or "families" of placeholders needs to be compatible for this to work, i.e. matching Type. The absence of Type means the placeholder is a general Content Type and match all Types.
During layout change, if Placeholders has incompatible Type while having the same idx-tag, PPT will look for the next Placeholder with matching Type.
#JohnKorchok's accepted answer provides the technical details for the procedure described here. Note that I only had "Content Placeholders" in my presentation.
Install 7-Zip and your favorite text editor (you can use one with an XML formatter, which will simplify things, but it's not required).
Open your file.pptx in 7-Zip (no need to rename to .zip, just right-click and "Open Archive")
Navigate to ppt/slideLayouts.
See a list of slideLayout....xml files.
Identify the ones you want to edit, e.g., by opening each one and looking for <p:cSld name. (The numbers may be indicative only of the order the layouts have been created, not of the order in which they are now shown in PowerPoint - although saving a .pptx files in PowerPoint 2016 does modify the slide layouts for me so that the display order matches the file name numbers.)
Look for <p:ph until you find the ones you want to edit. You probably want to ignore the ones with type="title", type="ftr", type="sldNum".
Change the idx of all other placeholders to 1, 2, ... in the order in which you want them filled (use the <p:cNvPr ... name= to identify the placeholders).
Save the .xml files, close your editor, and be asked by 7-Zip to update the archive. Answer "Yes".
So I set the idx to 1 for the one placeholder in my 1-content layout, to 1 for the left placeholder in my 2-content layout, and to 2 for the right placeholder in my 2-content layout.

Is it possible to make the Ctrl-Tab source file switching window (IDE Navigator) in Visual Studio have wider columns?

Some of my source files have long file names and when I press Ctrl-Tab or Shift-Ctrl-Tab, the filenames that are displayed in the Active Files column of the IDE Navigator get truncated (and replaced by an ellipsis) after the 23rd-24th character and become indistinguishable. I am wondering if there is a config file or registry setting somewhere for making the columns in the IDE Navigator wider so that larger file names can fit in the columnar display.
I wouldn't mind making the entire Navigator window larger as well, if it has a max width. When it pops up, I am not interested in seeing the code underneath it, just the filenames of the files that I am about to switch to through consecutive presses of (Shift-)-Ctrl-Tab. I know there is a secret registry entry for showing thumbnails in the Navigator, but I am wondering if there is some control over column width as well.
Thanks for any help.

Adding new filetypes to Windows 7's New context menu

I'm trying to add CSS, PHP, JS and HTML file types to the "New" right click menu in Windows 7. I know how to add the file types to the menu with ShellNew entries in the registry. But Windows doesn't give you any control over the display names of the new items - according to this the name's always taken from whatever application you've assigned to open the doc. I've set Notepad++ to open all of these file types, so I'm going to end up with several identical "Notepad++ document" entries in the menu, like this:
Does anybody know if there's a way out of this stupid situation without installing any tweak utilities?
Thanks all!
Fred
To rename a context menu > new's item (in Windows 7, at least):
Open regedit.
Go to HKEY_CLASSES_ROOT\.%ext% and note the (Default) value. This is the file extension's ProdID.
Go to HKEY_CLASSES_ROOT\%ProdID% (usually %ext%file) using the value obtained from step two. Set the (Default) value to whatever you would like the context menu new item to display as.
Under HKEY_CLASSES_ROOT\%ProdID%, if there is a FriendlyTypeName value, rename it to FriendlyTypeName.old, as the (Default) value "is deprecated by the FriendlyTypeName entry"
I don't believe there is even a need to log out / restart, but if the changes don't take effect, log out and/or restart.
You could change the file type description for each file class manually.
Look up the prog id under HKEY_CLASSES_ROOT\.%ext% (The default value)
Under HKEY_CLASSES_ROOT\%progid%, set the default value and/or the "FriendlyTypeName" string to the string you want.
You might have to log off for it to take effect.
You should probably stay away from the Chrome and Notepad++ file type/association dialogs so they don't overwrite your strings.
Both Chrome and Notepad++ are open source, you can create a patch for them that use better names for the file types. (What is a "Chrome HTML Document" anyway, HTML5 + extra chrome juice? =) )
I was able to derive a solution from the answers above.
I replicated the particular application (JetBrains PHPStorm in my case) registry entry.
PHPStorm2019.1 -> PHPStorm2019.1.scss, PHPStorm2019.1.js.
Now I changed the Default REG_SZ of PHPStorm2019.1.scss to SCSS File and PHPStorm2019.1.js to JavaScript file.
Mapped .scss and .js to PHPStorm2019.1.scss and PHPStorm2019.1.js respectively.

How to open executable binary without running it in ollydbg?

When I try to open a PE executable , it's automatically run.
How can I just open it statically without running it? I just want to see the binary file in hex format.
If you really want see it in "hex format" - just use any of hex viewer or hex editor. There are lots of them, including plugins for file managers (FAR, Total Commander) or hex editors like WinHex.
If you want to see it disassembled - use disassembler. IDA, hiew, etc.
Or, start OllyDbg, than in menu select View -> File .
Also, there is PE file header view mode (right mouse button (RMB) -> Special -> PE header). You can edit (RMB -> Binary -> Edit) and save file (RMB -> save) too.
You can read this in OllyDbg help, "Tips and tricks", 1st line.
for viewing your code in hex mode do this:
view > file
or
view > Executable modules > select module > right click > View executable file
your second question in comment : there's a "Keep Size" option which is checked by default,what does that mean?
keep size is not important. edit binary let you to change bytes. if you tick keep size it let you only change bytes you selected. if you don't tick you can change all bytes start from you select.

How do I edit a text buffer (or selected text) with the Visual Studio 2010 SDK

I want to create a simple extension which modifies text buffers based on a command. No sample, documentation or template that I've found so far explains anything about working with text buffers. Anyone got a clue how to do this?
What I want to end up with is a format selection/document extension for text files, that wrap content around 72 characters per line.
I found this extension together with sample very helpful, and now I have something which works. Though it was very counter intuitive at first, I was trying to get the at the code window while this example instead uses a command filter to fiddle with the text view by extending the editor.
The ITextView interface provides access to the text in the editor, you can access the Buffer through that and make changes that way.
Link
http://github.com/noahric/alignassignments

Resources